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

Set a event-handler when make a picker (appendDtpicker method) #81

Closed mugifly closed 10 years ago

mugifly commented 10 years ago

Like below:

$('xxx').appendDtpicker({
    'onHide': function(handler) {
        window.alert('Picker is hidden!');
        // You can handle (e.g. destroy) a picker by yourself, with using methods of handler object.
        handler.destroy(); // Destroy a picker
        // ...
    },
    'onShow': function(handler) {
        window.alert('Picker is shown!');
    }
});

This base idea was proposed by Kupid Wang. Thanks.

UPDATED (2013/12/31): Receive parameters was replaced to handler object.

zhuangya commented 10 years ago

+1

mugifly commented 10 years ago

Implemented this request at v1.10.0.

And, One more thing :) Manual handling of the appended picker (handleDtpicker method). 12d1132c62bb04465eb9900509e3403c6a972ad9