JQUERY datepicker calendar, how can I rename the done button to close

How can I rename the text of the Finish button to Close, the code as follows:

jQuery("#fromDatepicker, #toDatepicker").datepicker({ showButtonPanel: true, changeMonth : true, changeYear : true, dateFormat: 'mm/dd/yy', }); 

the above code displays the jQuery datpick calendar, the โ€œFinishโ€ button is present in the button bar, I would like to change the text โ€œFinishโ€ to โ€œCloseโ€. Please help me.

+7
source share
4 answers

You must add the closeText option to your call.

 jQuery("#fromDatepicker, #toDatepicker").datepicker({ showButtonPanel: true, changeMonth : true, changeYear : true, dateFormat: 'mm/dd/yy', closeText : "Close" }); 
+10
source

Provide closeText: "close"

or

$("#fromDatepicker, #toDatepicker").datepicker("option", "closeText", "close");

+4
source

add Close text: for example, change it to clear

closeText: 'Clear'

0
source

 $("#fromDatepicker, #toDatepicker").datepicker("option", "closeText", "close"); 
0
source

All Articles