You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[DateInputs] Focusing the year segment with mouse click and changing its value after having modified other segments results in inconsistent behavior
#4358
Open
zstoyanova9 opened this issue
Jul 17, 2024
· 1 comment
Describe the bug
When focusing the year segment manually using mouse click, after having previously modified the other segments, and then attempting to change the value of the year segment, produces inconsistent behavior for the year value.
There are times when the user is able to enter only two numbers and the focus moves to the next segment, at other times - only one number can be entered and the focus jumps.
When there is not a next segment available, the whole year can be entered, however, the segment is not initially reset and the previous numbers are kept. Also, when entering each number, the previous numbers move their position respectively to the left.
Modify the value of the first two segments using the keyboard numbers.
Focus the year segment using mouse click.
Start modifying the value of the year segment.
Expected behavior
The behavior should be consistent in this scenario, i.e. the year segment should be initially reset when entering the first number and the user should be able to enter the whole year afresh.
Additional context
This behavior is possibly related to and might be fixed with - #3824
It seems that the unexpected behavior is only reproducible when using a date format that contains "MMM" or "MMMM" specifiers, which is the problematic format stated in the above issue that does not automatically move the focus to the year part.
The text was updated successfully, but these errors were encountered:
It seems that the inconsistent behavior can also be reproduced in cases when a date format, in which the year segment is placed at the beginning, is used for the component.
StackBlitz example - https://stackblitz.com/edit/angular-aw1rst-kb8zvl
Describe the bug
When focusing the year segment manually using mouse click, after having previously modified the other segments, and then attempting to change the value of the year segment, produces inconsistent behavior for the year value.
There are times when the user is able to enter only two numbers and the focus moves to the next segment, at other times - only one number can be entered and the focus jumps.
When there is not a next segment available, the whole year can be entered, however, the segment is not initially reset and the previous numbers are kept. Also, when entering each number, the previous numbers move their position respectively to the left.
To Reproduce
Expected behavior
The behavior should be consistent in this scenario, i.e. the year segment should be initially reset when entering the first number and the user should be able to enter the whole year afresh.
Additional context
This behavior is possibly related to and might be fixed with - #3824
It seems that the unexpected behavior is only reproducible when using a date format that contains "MMM" or "MMMM" specifiers, which is the problematic format stated in the above issue that does not automatically move the focus to the year part.
The text was updated successfully, but these errors were encountered: