开发者

How to trigger onShow callback for Keith Wood jQuery datepicker?

开发者 https://www.devze.com 2023-03-11 11:18 出处:网络
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开发

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') } });
});
0

精彩评论

暂无评论...
验证码 换一张
取 消