ngx-mask
ngx-mask copied to clipboard
Is it possible to specify 12 hour format?
I would like to be able to have a mask with 12 hour format like HH:MM (AM/PM). Ideally, on keypressing to up or down the AM/PM should change.
Is this possible with ngx-mask?
Hi @isysenko Thanks for adding this issue to the To-Do list. Any ideas when it will be implemented?
Even I am also waiting for this feature. Any updates when this will be released?
It's been a full year. Still no update. I am looking for a solution as well.
any update ?
@isysenko I implemented this feature, but I don't have access rights to push my changes. Can you give them to me so I can prepare a pull request?
Any updates on this feature?
I'm looking for this feature two, can someone give @fiiiiif the access for PR?
@isysenko I implemented this feature, but I don't have access rights to push my changes. Can you give them to me so I can prepare a pull request?
can you please share your way to do that or make another repo and share for help. Thanks in advance
we really need this feature!
@Androsid @preetamjakhmola @bianca-patientnow @jacob-l @Toktik @daniel-barac @paras-deshbhratar @jacob-l Thanks for your using Ngx-Mask. Please update to latest version. It example, we add [apm] for 12 hour format -https://stackblitz.com/edit/angular-dzyuwe?file=src%2Fmain.ts
Hi, thx for this feature! But there is a small problem. I can't input 12:01. But instead it allows me to input 00:01. https://en.wikipedia.org/wiki/12-hour_clock
@egorkel-altexsoft Thanks for using Ngx-Mask. Please update to latest version. All work as expected - https://stackblitz.com/edit/angular-hfrynj?file=src%2Fmain.ts
Nice! It allows me to enter 12 hours now, but still, it allows me to enter 0 hours, which is not correct for 12-h notation.
Or I'm wrong?
@egorkel-altexsoft what do you expect to see when a user enters 00 ???
Same behavior as for number input when you are not allowed to enter letters. You just can't enter 00.
Well, if we talk about a 12-hour format then instead of 00:00 user should use 12:00. Or at least there should be an option for a "strict" format.
Or if you think you are good with this feature, can you tell me how I can use such kind of regexp /^(?:1[012]|0[1-9]):[0-5][0-9]$/ with your library?
@egorkel-altexsoft We disabled to enter 00. It example - https://stackblitz.com/edit/angular-lukujr?file=src%2Fmain.ts
Awesome! Thank you @andriikamaldinov1 👍
@egorkel-altexsoft We disabled to enter 00. It example - https://stackblitz.com/edit/angular-lukujr?file=src%2Fmain.ts
@andriikamaldinov1 how to distinguish between AM/PM?
I'm using additional button to switch between am/pm