When manually typing the time into the input field, the component triggers validation/formatting too aggressively.
If I attempt to type the hour 15, the moment I type the digit 1, the input automatically and immediately appends a 0 to make it 01. Because the input focus or value shifts, I am unable to type the subsequent 5 to complete the desired hour.
Steps to Reproduce
- Click inside the
ngx-mat-datetime-picker input field.
- Attempt to manually type the hour
15.
- Type the first digit:
1.
- Observation: The input immediately changes the value to
01 (or 01:00).
- Result: The user is blocked from typing the second digit (
5).
Expected Behavior
The input should wait for a blur event, a specific delimiter (like :), or a delay before auto-formatting single digits with a leading zero. The user should be able to type 1 followed by 5 without interruption.
Actual Behavior
The input auto-fills a leading zero (0) a few milliseconds after the first keystroke, effectively locking the value to a single-digit hour (e.g., 01). This is could be because of the input signal also.
Reproduction Code
<mat-form-field appearance="outline">
<mat-label>From</mat-label>
<input matInput
[ngxMatDatetimePicker]="frompicker"
placeholder="From"
[min]="minDate"
[max]="maxDate"
[(ngModel)]="fromDate">
<mat-datepicker-toggle matSuffix [for]="frompicker"></mat-datepicker-toggle>
<ngx-mat-datetime-picker
(closed)="onClose()"
[timeset]="setMaxDate()"
#frompicker
[enableMeridian]="enableMeridian">
</ngx-mat-datetime-picker>
</mat-form-field>
When manually typing the time into the input field, the component triggers validation/formatting too aggressively.
If I attempt to type the hour
15, the moment I type the digit1, the input automatically and immediately appends a0to make it01. Because the input focus or value shifts, I am unable to type the subsequent5to complete the desired hour.Steps to Reproduce
ngx-mat-datetime-pickerinput field.15.1.01(or01:00).5).Expected Behavior
The input should wait for a blur event, a specific delimiter (like
:), or a delay before auto-formatting single digits with a leading zero. The user should be able to type1followed by5without interruption.Actual Behavior
The input auto-fills a leading zero (
0) a few milliseconds after the first keystroke, effectively locking the value to a single-digit hour (e.g.,01). This is could be because of the input signal also.Reproduction Code