I use the jquery inputMask library ( https://github.com/RobinHerbots/jquery.inputmask ). But feel free to let me know if there is a better inputMask library. But I need inputMask, not a time collector.
The scenario is to have an inputMask in a time field. We want to display and have an inputMask based on a user locale so that it supports both 12-hour and 24-hour format. Initially, we only supported the 24-hour format, so the mask code looks like this:
$('input[id$="endTime"]').inputmask("hh:mm:ss", {placeholder: "HH:MM:SS", insertMode: false, showMaskOnHover: false});
Remember that we also need to maintain seconds. For the 12 hour format, I really tried several formats, but none of them worked well for me. So is it possible to disguise it?
source
share