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

getDate()

1 Answer 143 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Mattias
Top achievements
Rank 1
Mattias asked on 01 Apr 2009, 08:19 AM
Hi,
I need to grab the date from a raddatepicker.
The picker is initially set to 2009-03-01 but when I alert the selected date I just get "1" as in the day (I think)
var startDatePicker = $find("<%= RadDatePickerSalesStartDate.ClientID %>"); 
alert(startDatePicker.get_selectedDate().getDate()); 

Whats up with this?

/Mattias

1 Answer, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 01 Apr 2009, 08:44 AM
Hello Mattias,

Please try one of the following:
alert(startDatePicker.get_selectedDate()); 

or:
alert(startDatePicker.get_selectedDate().format("MM/dd/yyyy")); 

Best regards,
Daniel
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Calendar
Asked by
Mattias
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or