Topic: How do I disable a timepicker?

edwolfe free asked 3 years ago


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


Tomek Makowski staff commented 3 years ago

Hi,

Try out this solution

https://mdbootstrap.com/snippets/jquery/tomekmakowski/2550520#html-tab-view

Regards


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


edwolfe free answered 3 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).



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

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