How to trigger onShow callback for Keith Wood jQuery datepicker?
Using Keith Wood's datepicker how can I trigger a callback before the datepicker is shown so I can set the picker's parameters? Using the code below the callback (alert) is shown on page ready and开发者_StackOverflow社区 not before the datepicker is shown.
$(function(){
$( ".inputDatePick").datepick({ onShow: alert('on show callback') });
});
....
<input type="text" class="inputDatePick" />
doh! the correct syntax for a callback is a function :
$(function(){
$( ".inputDatePick").datepick({ onShow: function () { alert('on show callback') } });
});
精彩评论