i have followed
jQuery UI Datepicker - Display
onSelect
$("#expirationDate").datepicker({
buttonImage: '../Images/calendar.gif',
buttonImageOnly: true,
changeMonth: true,
changeYear: true,
showOn: 'both',
onSelect: function () {
getValidTillDateValue(this);
}
});
function getValidTillDateValue(ele) {
return $(ele).val();
}
If you want the Date value later say on form submit you want to check the value
valuePublishDate = $("#customerPublishingDate").datepicker("getDate");