This is a migrated thread and some comments may be shown as answers.

Get SelectedDate from RadDatePicker

1 Answer 128 Views
Input
This is a migrated thread and some comments may be shown as answers.
Johnny
Top achievements
Rank 2
Johnny asked on 13 Jul 2011, 11:15 AM
hi i get the SelectedDate of RadDatePicker from javasctipt OnDateSelectedevent in following format
 "Wed Jul 6 00:00:00 UTC+0800 2011"
when i try to convert this string to Date i getting the following  error
Conversion from string "Wed Jul 6 00:00:00 UTC+0800 2011" to type 'Date' is not valid.
how to solve this

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 13 Jul 2011, 12:14 PM
Hello Johnny,

You can use the following client side code to get the correct date.

ClientSide:
function OnDateSelected(Sender, e)
    {
        alert("OnDateSelected: " + e.get_newDate().toDateString());
    }

Thanks,
Princy.
Tags
Input
Asked by
Johnny
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Share this question
or