I am having a problem with date formats. I am adding a date picker in my code behind. When I select the date, it appears in the correct format in the textbox (10/19/2009) but when I retrieve the value through javascript it shows it in another format (2009-10-22).
The code to add the date picker appears below.
RadDatePicker dPick = new RadDatePicker();
dPick.ID = "DateField1";
dPick.Culture = CultureInfo.GetCultureInfo("en-US");
plcForm.Controls.Add(dPick);
The javascript code I use to retrieve the value appears below:
function TestForm()
{
alert(document.forms[0].DateField1.value);
}
Am I setting the culture format incorrectly?
The code to add the date picker appears below.
RadDatePicker dPick = new RadDatePicker();
dPick.ID = "DateField1";
dPick.Culture = CultureInfo.GetCultureInfo("en-US");
plcForm.Controls.Add(dPick);
The javascript code I use to retrieve the value appears below:
function TestForm()
{
alert(document.forms[0].DateField1.value);
}
Am I setting the culture format incorrectly?