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

Selecting 12:00am from a dropdown populates 0 into the input field.

Open Xenology opened this issue 4 years ago • 5 comments
trafficstars

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());
});

Screen Shot 2021-02-23 at 7 52 05 PM

Screen Shot 2021-02-23 at 7 52 12 PM

Xenology avatar Feb 24 '21 02:02 Xenology

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());

Umair-araein avatar Mar 11 '21 14:03 Umair-araein

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.

Xenology avatar Mar 18 '21 22:03 Xenology

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?

jonthornton avatar Apr 12 '21 02:04 jonthornton

Can confirm that this issue was happening as described on 1.13.16, but is resolved for us on 1.13.18.

naoca-au avatar May 11 '21 07:05 naoca-au

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.

Xenology avatar May 19 '21 19:05 Xenology