bootstrap-timepicker icon indicating copy to clipboard operation
bootstrap-timepicker copied to clipboard

Fix BUG pad hours with leading zero

Open marcoscarraro opened this issue 10 years ago • 3 comments

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:"")}

marcoscarraro avatar Apr 02 '14 20:04 marcoscarraro

thanks for that

danielpina avatar Sep 01 '14 10:09 danielpina

you're welcome, but I believe this is only in my fork, have you tried it ?

eleumik avatar Sep 02 '14 18:09 eleumik

link from title: https://github.com/MartijnR/bootstrap-timepicker/commit/aa3653b02c339c53e88ee3d0611e4e566a882c42#commitcomment-5887335

mrhota avatar Aug 03 '15 19:08 mrhota