mugifly / jquery-simple-datetimepicker

Date & time picker for jQuery, It's simple & clean.
http://mugifly.github.com/jquery-simple-datetimepicker
Other
260 stars 182 forks source link

onHide user event-handler not invoked when closeOnSelected is set to true #132

Open patrickehughes opened 10 years ago

patrickehughes commented 10 years ago

Set closeOnSelcted to true. When the dtpicker hides due to selection the onHide method is not invoked. When it closes due to a click outside of the dtpicker, the onHide method is invoked as expected.

asifhuddani commented 7 years ago

I am facing an same issue, did you find any solution?

alpo008 commented 5 years ago

Bug #132 solution https://github.com/alpo008/jquery-simple-datetimepicker.git

if ($picker.data("isInline") === false && $picker.data("closeOnSelected")){
    // Apply callback
    var func = $picker.data('onHide');
    if (typeof func === 'function') {
        func();
    }
        // Close picker
    ActivePickerId = -1;
    $picker.hide();
}