bootstrap-timepicker
bootstrap-timepicker copied to clipboard
Fix BUG pad hours with leading zero
Please update on bootstrap-timepicker.min.js
New function to add 0 using 24 hours!!!
replace
return this.hour||this.minute||this.second?this.hour+":"+(1===this.minute.toString().length?"0"+this.minute:this.minute)+(this.showSeconds?":"+(1===this.second.toString().length?"0"+this.second:this.second):"")+(this.showMeridian?" "+this.meridian:""):""}
for
return(this.hour.toString().length===1?"0"+this.hour:this.hour)+":"+(this.minute.toString().length===1?"0"+this.minute:this.minute)+(this.showSeconds?":"+(this.second.toString().length===1?"0"+this.second:this.second):"")+(this.showMeridian?" "+this.meridian:"")}
thanks for that
you're welcome, but I believe this is only in my fork, have you tried it ?
link from title: https://github.com/MartijnR/bootstrap-timepicker/commit/aa3653b02c339c53e88ee3d0611e4e566a882c42#commitcomment-5887335