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

How to Retrieve input in RadDatePicker.DateInput

4 Answers 234 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Ricky
Top achievements
Rank 1
Ricky asked on 20 Jan 2008, 09:38 AM
Hi,
I use var from1_Text = $find("<%= FromDate.ClientID %>").get_DateInput(); to get the input text field.

How do I further get the text entered in?

Thanks,
Ricky.

4 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 21 Jan 2008, 11:11 AM
Hi Ricky,

You do not need to get the DateInput in order to get the selected date. Here is a sample:

    var datePicker = $find("<%= RadDatePicker1.ClientID %>");
    var date = datePicker.get_selectedDate();
    alert(date);

Hope this helps.

Regards,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Ricky
Top achievements
Rank 1
answered on 21 Jan 2008, 02:05 PM
Hi, thanks first.
But I just want the input text (e.g., 2007/11/12) inside DateInput ; your tip will return complete foramt of DateTime that doesn't cater to my need.

Ricky.
0
Steve
Telerik team
answered on 21 Jan 2008, 02:20 PM
Hi Ricky,

RadDateInput and RadCalendar are tied together, so both will show the exact same value. You can try it to verify. Once you get the date you can format it as you wish or only get the date, month, year etc. Here is a sample:

    var datePicker = $find("<%= RadDatePicker1.ClientID %>");
    var input = datePicker.get_DateInput();
    var date = input.get_selectedDate().toLocaleDateString();

Hope this helps.

Greetings,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Ricky
Top achievements
Rank 1
answered on 22 Jan 2008, 01:11 PM
Understand.
Thansks for the help

Ricky.
Tags
Calendar
Asked by
Ricky
Top achievements
Rank 1
Answers by
Steve
Telerik team
Ricky
Top achievements
Rank 1
Share this question
or