Here is my code...
It should populate my datepicker with the date of birth from my Javascript.
However this dosen't work using the control above, nothing is entered into the datepicker (and yes I have verified the variable holding the date is valid using an alert box) and looking at my rendered source code, I see that RadCalendar produces two more input controls:
ctl00_ContentPlaceHolder1_fvClients_DOBTextBox_dateInput_text
ctl00_ContentPlaceHolder1_fvClients_DOBTextBox_dateInput
If I change my JS code to populate these input boxes, I start to see results, however they still do not work. If I use the input control which ends in "dateInput" and then click in the radDatePicker after it populates, the input control clears and the date is lost.
Then if I use the input control which ends in "dateInput_text" and then click in the radDatePicker after it populates, the input control changes to "0NaN/0NaN/0NaN" and the date reverts back default "minDate" of 1998/12/31
So my question is, using JS what input control should I be targeting and how do I get the date to "stick" even when someone clicks in the datePicker control field?
strDOB = strDOB & "/" & mid(USBHID.GetTrack(2), 30, 2) & "/" & mid(USBHID.GetTrack(2), 32, 2) |
document.getElementById ("ctl00_ContentPlaceHolder1_fvClients_DOBTextBox").value = strDOB |
However this dosen't work using the control above, nothing is entered into the datepicker (and yes I have verified the variable holding the date is valid using an alert box) and looking at my rendered source code, I see that RadCalendar produces two more input controls:
ctl00_ContentPlaceHolder1_fvClients_DOBTextBox_dateInput_text
ctl00_ContentPlaceHolder1_fvClients_DOBTextBox_dateInput
If I change my JS code to populate these input boxes, I start to see results, however they still do not work. If I use the input control which ends in "dateInput" and then click in the radDatePicker after it populates, the input control clears and the date is lost.
Then if I use the input control which ends in "dateInput_text" and then click in the radDatePicker after it populates, the input control changes to "0NaN/0NaN/0NaN" and the date reverts back default "minDate" of 1998/12/31
So my question is, using JS what input control should I be targeting and how do I get the date to "stick" even when someone clicks in the datePicker control field?