I would like to add a \"Reset\" control to the datepicker at the bottom of the calendar - where the \"close\" control goes. This would enable the user to reset the input tie
Change the Done label to Clear and add code to clear
$(document).ready(function () {
$("#startdate").datepicker({
showOn: 'both',
buttonImageOnly: true,
buttonImage: "css/images/calendar.gif",
showButtonPanel: true,
closeText: 'Clear',
onClose: function (dateText, inst) {
$(this).val('');
}
});
});
Add Cancel button to the calendar
$("#termdate").datepicker({
showOn: 'both',
buttonImageOnly: true,
buttonImage: "css/images/calendar.gif",
showButtonPanel: true,
beforeShow: function (input) {
setTimeout(function () {
var buttonPane = $(input).datepicker("widget")
.find(".ui-datepicker-buttonpane");
var btn = $('');
btn.unbind("click").bind("click", function () {
$.datepicker._clearDate(input);
});
btn.appendTo(buttonPane);
}, 1);
}
});