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

Set Empty message when focus also

3 Answers 72 Views
Input
This is a migrated thread and some comments may be shown as answers.
vinoth sansar
Top achievements
Rank 2
vinoth sansar asked on 19 Jul 2011, 11:26 AM
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

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 22 Jul 2011, 09:40 AM
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!

0
Maria Ilieva
Telerik team
answered on 22 Jul 2011, 09:40 AM
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!

0
vinoth sansar
Top achievements
Rank 2
answered on 22 Jul 2011, 01:18 PM
hi Maria Ilieva,

   Thanks for your reply. 

vinoth
Tags
Input
Asked by
vinoth sansar
Top achievements
Rank 2
Answers by
Maria Ilieva
Telerik team
vinoth sansar
Top achievements
Rank 2
Share this question
or