开发者

How to use button to get a Jquery Datepicker?

I want to create a Datechooser, but I want a button near the text field and when I click the button, the Datepicker should show up, but selecte开发者_开发百科d date should be in the text box.

How can I do this.


Try jQuery UI DatePicker.

$(function() {
    $("#datepicker").datepicker({
        showOn: "button",
        buttonImage: "images/calendar.gif",
        buttonImageOnly: true
    });
});

Demo from jQuery UI site: http://jqueryui.com/demos/datepicker/#icon-trigger

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜