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

Cant set the midnight value

Open animeshshrestha2012 opened this issue 10 years ago • 7 comments

I have been using the timepicker in my project management system app to add timesheet. Whenever i have to add some time, lets say, from 18:00 to 12 midnight i.e. 24:00, it reverts back to 23:00 and there is a minimum of 1 minute loss each time that i add that time.

Please let me know any workarounds for this or let me know if i could not make the problem clear.

Thanks in advance.

animeshshrestha2012 avatar Jun 09 '14 10:06 animeshshrestha2012

Just to be sure we are seeing the same thing. Can you explain exactly what you mean by "Add some time". Did you add time via code? Did you add time via the buttons on the screen? How much time did you add? Can you outline the exact steps we can follow to reproduce your issue?

nholling avatar Jun 11 '14 13:06 nholling

@animeshshrestha2012 can you try this and check if the problem shows up ? I think that I coded against this problem but not sure. thanks https://github.com/eleumik/bootstrap-timepicker/blob/06fec59a736ae31c50b30b0746c2de42f662bcd8/js/bootstrap-timepicker.js https://raw.githubusercontent.com/eleumik/bootstrap-timepicker/06fec59a736ae31c50b30b0746c2de42f662bcd8/js/bootstrap-timepicker.js

eleumik avatar Jun 12 '14 03:06 eleumik

The issue seams to be that 00:00:00 is not considered a time but an empty value. This conflicts with client validation.

gwaz avatar Jul 15 '14 13:07 gwaz

I Have the same problem, when the input is set with the value "00:00:00" the plugin clean of value of control. How to procced with this?

candidodmv avatar Jul 10 '15 14:07 candidodmv

I found the source problem there is on line 134 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 : "")) : ""

candidodmv avatar Jul 10 '15 15:07 candidodmv

I am having the same issue that "0:00" isn't displayed. I found it is the issue of the minified version bootstrap-timepicker.min.js. It works fine with bootstrap-timepicker.js. FYI, i am using v0.2.6.

bitghostm avatar Sep 28 '15 21:09 bitghostm

@make711 We have newer versions. Please update.

mrhota avatar Oct 17 '15 15:10 mrhota