Open cjohnston-ey opened 1 year ago
So now I need to revert what I did for #49
The changes for #49 are still important, but it seems like those changes uncovered some other time parsing oddities.
@cjohnston-nuvalence I just published the revert for that fix. You're still convinced it's a parsing issue, but it's not. Here we're trying to control how user types values inside the inputs. Basically you wanted to prevent Invalid Datetime caused ignorant users that type before "00" without deleting. I'll try to see a clean way of checking how the input is changed (before or after existing value), but for now it's better to go back the way it was.
This is solved by v 15.1.5
Hi @cjohnston-nuvalence can you please check how the input at the bottom of the page behaves?
https://stackblitz.com/edit/ts-angular-13-web-container-starter
That behavior looks pretty good except in one case.
After the "1" is entered, the value is set to "10" and cursor is placed at the end of the input which ends up ignoring the "5"
@cjohnston-nuvalence hehehe I came across the same behaviour... I have no idea why it goes havoc with zeroes... But you know the most interesting fact? It only behaves this way with angular! I'll add a simple js version of this in the same blitz and you'll see that it doesn't happen... I guess that is something related to the lifecycle...I'll do some experiments with zone and see if I can improve... If I get something stable I can integrate the code in the lib and have the improved behaviour...
EDIT Actually it's not the zeroes...but yet...try the normal when you have time...
REEDIT I did another behaviour change in the Angular one...since you can't basically set the caret at position 1 after typing, why not deleting the existing value completely? This allows the user to start typing a new value without incurring in the "Invalid Datetime" error. I think I'll made some kind of poll on the demo site...
Describe the bug I believe changes made to fix #49 made it more difficult to enter time with the keyboard.
To Reproduce Stackblitz: https://stackblitz.com/github/cjohnston-nuvalence/ngx-mat-timepicker-keyboard
If I want to enter a time with "35" as the minutes by the keyboard, for example, there are a couple of ways to do it and each has issues.
All scenarios assume a timepicker with
[enableKeyboardInput]="true"
set.Scenario 1:
Scenario 2:
Scenario 3:
Expected behavior In all scenarios the minutes should be set as 35
Desktop (if execution):
** Versions