Set Empty message when focus also

4 posts, 0 answers
  1. vinoth sansar
    vinoth sansar avatar
    33 posts
    Member since:
    May 2010

    Posted 19 Jul 2011 Link to this post

    Dear all,

             I am using RadDateInput controls. I need "00/00/00" when focus to that controls. Am using (DisplayDateFormat="dd-MMM-yyyy" DateFormat="MM/dd/yy" ) attributes also.

    thanks,
    vinoth

  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 22 Jul 2011 Link to this post

    Hello Vinoth,

    Note that you could not set 00/00/00 in the DateInput control as it expect valid dates to be entered. RadDateInput assists the user in date and time entry by accepting various date and time formats and tries to recognize them and convert them into valid dates. The above mentioned value is not a valid date. However you could set nay valid date on focus of the control using the following:
    <script type="text/javascript">
            function Focus() {
             
                var dateInput = $find("<%= RadDateInput1.ClientID %>");
                dateInput.set_value("09/10/2011");
            }
     
        </script>
     
     
    <telerik:RadDateInput ID="RadDateInput1" ClientEvents-OnFocus="Focus" DateFormat="MM/dd/yyyy" runat="server"></telerik:RadDateInput>



    I hope this helps.

    Regards,
    Maria Ilieva
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 22 Jul 2011 Link to this post

    Hello Vinoth,

    Note that you could not set 00/00/00 in the DateInput control as it expect valid dates to be entered. RadDateInput assists the user in date and time entry by accepting various date and time formats and tries to recognize them and convert them into valid dates. The above mentioned value is not a valid date. However you could set nay valid date on focus of the control using the following:
    <script type="text/javascript">
            function Focus() {
             
                var dateInput = $find("<%= RadDateInput1.ClientID %>");
                dateInput.set_value("09/10/2011");
            }
     
        </script>
     
     
    <telerik:RadDateInput ID="RadDateInput1" ClientEvents-OnFocus="Focus" DateFormat="MM/dd/yyyy" runat="server"></telerik:RadDateInput>



    I hope this helps.

    Regards,
    Maria Ilieva
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  4. vinoth sansar
    vinoth sansar avatar
    33 posts
    Member since:
    May 2010

    Posted 22 Jul 2011 Link to this post

    hi Maria Ilieva,

       Thanks for your reply. 

    vinoth
Back to Top