In the class MatCalendarHeader in updateValues() the formatting for the hour is ignoring the double digit: it doesn't display the 0 in front of the hour!
this._hourButtonText = hours.toString(); --> any hour < 10 has only 1 digit
Expected behavior
Hour button text should have 0 for hour < 10, example => 06 instead of 6.
Could you please fix it as you do for the minutes? like this:
this._hourButtonText = ('00' + hours).slice(-2);
Bug description
DatePicker for TimeView when type="time"
In the
class MatCalendarHeader
inupdateValues()
the formatting for the hour is ignoring the double digit: it doesn't display the0
in front of the hour!this._hourButtonText = hours.toString();
--> any hour < 10 has only 1 digitExpected behavior
Hour button text should have 0 for hour < 10, example => 06 instead of 6. Could you please fix it as you do for the minutes? like this:
this._hourButtonText = ('00' + hours).slice(-2);
Screenshots