开发者

trigger function on "gotoCurrent" with jQuery datepicker

I very happy using the datepicker from jQuery UI.

and the onSelect: function... works perfectly.

But:

How do I go about triggering a function when I click the "gotoCurrent"-button beneath the calendar. As far as I can see I can only trigger on onSelect by d开发者_如何学Cefault, so I guess what I need to do is actually extend the functionality of datepicker?

Any hints on what I need to do?


$( ".selector" ).datepicker({ gotoCurrent: function(){...}; });

I believe that will work. If I understood you correctly.

Alternatively:

$('ui-datepicker-current').click(function(){
     some function

});


    $("#datepicker button.ui-datepicker-current").attr("onclick", "");
    $("#datepicker button.ui-datepicker-current").click(function() {
        //do stuff
    });

This worked. If anyone has a more beautiful solution I'd be happy to see it :-)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜