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
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);
Screenshots
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: