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
精彩评论