Topic: date/time picker feature request - disable input

lyahim free asked 3 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 commented 3 years ago

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


lyahim free answered 3 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

  • ForumUser: 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