jquery-timepicker
jquery-timepicker copied to clipboard
Selecting 12:00am from a dropdown populates 0 into the input field.
Using this time picker with AngularJS 1.8.2 results in the 12:00am option in the dropdown setting the value of the input it is bound to with 0 instead of 12:00am. This is the only time option this happens for. This issue appears to have been introduced in tag 1.13.16 as it does not occur in 1.13.14.
This is the configuration I am using in an AngularJS Directive.
jQuery(element[0]).timepicker({
stopScrollPropagation: false,
disableTextInput: true,
disableTouchKeyboard: true,
orientation: "bl",
step: 60
})
.on("changeTime", function() {
scope.ngModel = jQuery(element[0]).val();
}).on("showTimepicker", function(){
jQuery(".ui-timepicker-wrapper").width(jQuery(element[0]).outerWidth());
});


Your can simple select first index in Dropdrown..its works for me. after work on in lot of hours. Like this.
$(".makeDropDown").val($(".makeDropDown option:first").val());
In the use case I have, individuals click on the input and the times dropdown comes up. When they click the first option, that is when this bug shows up.
I'm unable to reproduce this on the demo page at https://www.jonthornton.com/jquery-timepicker. Can you confirm if it's still an issue in 1.13.18?
Can confirm that this issue was happening as described on 1.13.16, but is resolved for us on 1.13.18.
The demo page appears to resolve the issue that I encountered, let me pull this down into my application and see if the issue is resolved there.