How do I disable a timepicker?


Topic: How do I disable a timepicker?

edwolfe asked 4 years ago

How do I disable a timepicker? I've tried putting a disabled attribute on it, but it appears to ignore it.


edwolfe answered 4 years ago

Ok. This solved it. I would like to request an enhancement so that the control could be told to be disabled or enabled. Something like $('.time-picker').timepicker('disabled', 'true') or similar. Makes for cleaner code (and less error prone) than having add disabled to 3 labels (or even need to add it to all children).


edwolfe answered 4 years ago

I have created a JQuery extended function to accomplish this task. It keeps your JavaScript clean with only one line needed to disable/enable a timepicker.

https://mdbootstrap.com/snippets/jquery/edwolfe/2559840


Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

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