date/time picker feature request - disable input


Topic: date/time picker feature request - disable input

lyahim asked 4 years ago

Dear Support,

I would like to recommend a new feature in date and time picker components. Is it possible to add a property what control the input field editable or not?

Thank you, Mihaly


Magdalena Dembna staff premium commented 4 years ago

Hi, Thank you for your suggestion - I will attach it to our idea board. Best regards, Magdalena


lyahim answered 4 years ago

I found a workaround while the feature is arriving. I get the input from DOM and put a readonly attribute on it.

<mdb-time-picker-2  ref="timePicker" ..../>
let timePicker = this.$refs["timePicker"].$refs["input"].$refs["input"];
timePicker.setAttribute("readonly", "readonly");

<mdb-date-picker-2  ref="datePicker".../>
let datePicker = this.$refs["datePicker"].$refs["popper"].children[0].children[0];
datePicker.setAttribute("readonly", "readonly");

Mihaly


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: 6.7.1
  • Device: All
  • Browser: All
  • OS: All
  • Provided sample code: No
  • Provided link: No