I have a textbox that is wired up to a calendar control like so
$('#txtPromoPrcStrt').datepick({
dateFormat: 'mm/dd/yyyy',
onSelect: function(selectedDate) { txtPromoPrcStrt_TextChanged(); }
});
and inside of the txtPromoPrcStrt function I am triggering the change event so that I can postback to the server. Everything works fine on the server, I can see the value of the date I selected in the TextBox.Text. The problem is that when the page is rendered after the postback, I no longer see the value in the TextBox even though when I view the source I can see my date in the value=”” of the INPUT tag. Can anyone tell me what is taking place?
The datepicker is probably blanking the field when it loads initially. There’s probably an option on that to default the field to the value of the datepicker, but otherwise you can do this:
You set the value to what the attribute had.