I have a page which uses a RadDateInput which plays quite nicely. In another place I have an <asp:textbox /> control in which I dynamically set to a date input using a RadInputManager, if the answer required is a date.
These are both on the same page and the client "onerror" properties point to the following javascript function;
function OnError(sender,args){args.set_cancel(true)}
As I mentioned, the RadDateInput plays nicely but the RadInputManager one crashes if you don't enter a valid date (then tab/click out of the box or submit) with a javascript error; for example, "G.getFullYear is not a function". This occurs in all browsers.
Working:
<telerik:RadDateInput ID="txtDOB" runat="server" SelectionOnFocus="SelectAll" DateFormat="d" MinDate="01/01/1930" MaxDate="01/01/2000" Culture="en-GB" EmptyMessage="DD/MM/YYYY"><ClientEvents OnError="OnError" /></telerik:RadDateInput>
Broken:
<telerik:DateInputSetting BehaviorID="setDate" DateFormat="d" Culture="en-GB" EmptyMessage="DD/MM/YYYY" ClientEvents-OnError="OnError" SelectionOnFocus="SelectAll" />
It appears that the javascript OnError() is not working for this control - but what is worse is that if I do not have the ClientEvents-OnError attribute set then I cannot submit valid dates! The control shows it's error state when a valid date is entered and prevents form submission!
This is a very busy high-profile website - I might need to raise a ticket but I'm posting here first in case anyone else is familiar with this behaviour?
These are both on the same page and the client "onerror" properties point to the following javascript function;
function OnError(sender,args){args.set_cancel(true)}
As I mentioned, the RadDateInput plays nicely but the RadInputManager one crashes if you don't enter a valid date (then tab/click out of the box or submit) with a javascript error; for example, "G.getFullYear is not a function". This occurs in all browsers.
Working:
<telerik:RadDateInput ID="txtDOB" runat="server" SelectionOnFocus="SelectAll" DateFormat="d" MinDate="01/01/1930" MaxDate="01/01/2000" Culture="en-GB" EmptyMessage="DD/MM/YYYY"><ClientEvents OnError="OnError" /></telerik:RadDateInput>
Broken:
<telerik:DateInputSetting BehaviorID="setDate" DateFormat="d" Culture="en-GB" EmptyMessage="DD/MM/YYYY" ClientEvents-OnError="OnError" SelectionOnFocus="SelectAll" />
It appears that the javascript OnError() is not working for this control - but what is worse is that if I do not have the ClientEvents-OnError attribute set then I cannot submit valid dates! The control shows it's error state when a valid date is entered and prevents form submission!
This is a very busy high-profile website - I might need to raise a ticket but I'm posting here first in case anyone else is familiar with this behaviour?