Topic: Mdb input mask for Time

jcarvalho priority asked 4 months ago


Could you please share an example for input mask for time in 12 hr format? For example : 11:00:01 AM/PM


Grzegorz Bujański staff answered 4 months ago


I have prepared two examples for you in this snippet: https://mdbootstrap.com/snippets/standard/grzegorz-bujanski/6202607

The first is the simplest example that forces you to enter numbers or letters. The second one is more complicated and blocks the entry of digits other than 0 or 1 in the first character, or the first digit greater than 5 in the minutes. But both examples cannot guarantee 100% that the user will not enter an incorrect value. For example, in the second example you will still be able to enter e.g. 19:59:59 AM. Input mask does not provide full validation that will enable validating such complex cases



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: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 7.1.0
  • Device: mac
  • Browser: google chrome
  • OS: Mac Os
  • Provided sample code: No
  • Provided link: No