Reputation: 1270
How can i rename the Done button text to "Close", the code as follows,
jQuery("#fromDatepicker, #toDatepicker").datepicker({
showButtonPanel: true,
changeMonth : true,
changeYear : true,
dateFormat: 'mm/dd/yy',
});
the above code displays JQuery datepicker calendar, Done button is present in Button Panel, i would like to change the "Done" text to "Close". Please any one help me.
Upvotes: 8
Views: 9434
Reputation:
$("#fromDatepicker, #toDatepicker").datepicker("option", "closeText", "close");
Upvotes: 0
Reputation: 512
add Close Text: for example change it to clear
closeText: 'Clear'
Upvotes: 0
Reputation: 26601
You should add the closeText
option to your call.
jQuery("#fromDatepicker, #toDatepicker").datepicker({
showButtonPanel: true,
changeMonth : true,
changeYear : true,
dateFormat: 'mm/dd/yy',
closeText : "Close"
});
Upvotes: 10
Reputation: 175896
Provide closeText: "close"
or
$("#fromDatepicker, #toDatepicker").datepicker("option", "closeText", "close");
Upvotes: 4