JsDaddy / ngx-mask

Angular Plugin to make masks on form fields and html elements.
https://jsdaddy.github.io/ngx-mask
MIT License
1.15k stars 298 forks source link

LeadZeroDateTime gives wrong date #1251

Closed gerwinbouwhuis closed 10 months ago

gerwinbouwhuis commented 12 months ago

LeadZeroDateTime gives wrong date

"d0/M0/0000" with LeadZeroDateTime = true

Add (4122000), expected 04-12-2000 but gives 01/02/2000 Add (442000), expected 04-04-2000 but gives 04/02/0000

Example: https://stackblitz.com/edit/stackblitz-starters-zln7s7?file=src%2Fapp%2Fnumber-input%2Fnumber-input.component.html

LikDan commented 11 months ago

The same problem. This is because of when you try to enter number that bigger than necessary (for example 3,4,5,6,7,8,9 in hours) the cursor position stay between 0 and this number For example when you use mask Hh:m0 and try to enter 9 you expect that input will be '09|' but it is '0|9' (the '|' symbol represents cursor)

andriikamaldinov1 commented 10 months ago

@gerwinbouwhuis @LikDan Thanks for using Ngx-Mask. Please update to latest version. It example all work as expected - https://stackblitz.com/edit/stackblitz-starters-4mpg1y?file=src%2Fapp%2Fnumber-input%2Fnumber-input.component.html

gerwinbouwhuis commented 10 months ago

@andriikamaldinov1

I found some bugs:

andriikamaldinov1 commented 10 months ago

@gerwinbouwhuis Please update to latest version. t example all work as expected - https://stackblitz.com/edit/stackblitz-starters-rnfwft?file=src%2Fapp%2Fnumber-input%2Fnumber-input.component.html

gerwinbouwhuis commented 10 months ago

@andriikamaldinov1

It works now correct, thnx!!