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

RadCalendar Q3 2008-> Getting error multiple times

1 Answer 57 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
murthy
Top achievements
Rank 1
murthy asked on 11 Nov 2010, 02:02 PM
Hi,
I am using RadDatePicker and have written the below given java script function to handle OnError event.
Now if I enter 505050 as the input i am getting the error "Enter a Valid Date in YYYY/MM/DD Format" multiple times if I press the "Enter" key to close the alert dialog which is very annoying. 
I am new to ASP.NET as well as Telerik controls. Please let me know what is going wrong.

ASPX
<telerik:RadDatePicker ID="dtmFromDt" runat="server" Width="100px"
   Visible="true" MinDate="1500/01/01" MaxDate="3000/01/01" DateInput-DateFormat="yyyy/MM/dd"                                                     Skin="WebBlue">
        <ClientEvents OnPopupClosing="OnPopupClosing"/>
<DateInput  runat="server" EmptyMessage="YYYY/MM/DD" Visible="true" ClientEvents-OnError="ShowDateError" >                     </DateInput>
<Calendar Skin="WebBlue" runat="server" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False"                                                    ViewSelectorText="x">
</Calendar><DatePopupButton HoverImageUrl="" ImageUrl="" />
</telerik:RadDatePicker>
JavaScript 
function ShowDateError(sender, args)  
{  
alert ("Enter a Valid Date in YYYY/MM/DD Format");  
sender.focus();   
return false;
}

Please find attached image of code from a sample solution

Regards,
Murthy Meka

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 11 Nov 2010, 02:26 PM
Hi Murthy,

This issue is fixed in newer RadControls versions. In your case you can use a global Javascript variable as a flag to prevent multiple alerts from appearing.

Kind regards,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Calendar
Asked by
murthy
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or