How to Retrieve input in RadDatePicker.DateInput

5 posts, 0 answers
  1. Ricky
    Ricky avatar
    247 posts
    Member since:
    Jun 2007

    Posted 20 Jan 2008 Link to this post

    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.
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 21 Jan 2008 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ricky
    Ricky avatar
    247 posts
    Member since:
    Jun 2007

    Posted 21 Jan 2008 Link to this post

    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.
  5. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 21 Jan 2008 Link to this post

    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
  6. Ricky
    Ricky avatar
    247 posts
    Member since:
    Jun 2007

    Posted 22 Jan 2008 Link to this post

    Understand.
    Thansks for the help

    Ricky.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017