The working datepickers all share the same options initialization setting, which the inline date picker does not. Here is the 'code' for the inline datepicker:
<div id="calendarDiv"></div>
<script>
$( '#calendarDiv' ).datepicker( {
dateFormat: 'mm/dd/yy',
currentText: 'Today',
numberOfMonths: 3, // [ 2, 3 ]
showCurrentAtPos: 1,
gotoCurrent: true,
changeMonth: true,
changeYear: true,
showButtonPanel: true,
onSelect:function( dateText, inst ) {
$( '#calendarDiv' ).datepicker( "option", 'currentText', 'Selected' );
setDatePicker( 'calendarDiv', dateText );
}
} );
</script>
<script>
function setDatePickerDate( whichDatePicker, newDate ) {
$( "#" + whichDatePicker ).datepicker( "setDate", newDate );
}
</script>
Incidentally, in my inline datepicker's onSelect handler, when I tried using the inst parameter to change the currentText button's text, it didn't change the text, so I 'brute-forced' the change, as shown above. If the inst contains the datepicker object, why wouldn't the following work?