Closed alisabzevari closed 8 years ago
Not currently, but I would love to support it. Dupe of #203
Truly, this would be supported implicitly if we internationalize the timepicker. I'm short on time.
You can solve this by editing the following functions in the original code:
`decrementHour: function() {
/* Added this line at the end*/
if (this.hour < 10) {this.hour = "0" + this.hour;}
},
incrementHour: function() {
/* Added this line at the end */
if (this.hour < 10) {this.hour = "0" + this.hour;}
},`
setTime: function(time, ignoreWidget) {
/* Added this line at the end */
if (hour < 10) {hour = "0" + hour;}
this.hour = hour;
this.minute = minute;
this.second = second;
this.meridian = meridian;
this.update(ignoreWidget);
},`
just an addition for juande32 answers
change part in incrementHour: function() {
from:
if (this.hour === this.maxHours - 1) {
this.hour = 0;
return;
}
to:
if (this.hour === this.maxHours - 1) {
this.hour = "0"+0;
return;
}
Is there any way to add leading zero to time? For example: 1:30 => 01:30