I have a question
Similar to this thread: http://www.telerik.com/community/forums/thread/b311D-mebde.aspx
I would like to use the normal ASP.net validation controls with the RadDatePicker and perform client-side validation
rather than the inbuilt validation of the RadDatePicker.
I do not want the RadDatePicker style to change when an invalid date is entered.
when I'm validating against the normal text box, I use a regular expression validator, and then display a message next to the text box with the correct date format.
This is how I validate all the rest of the controls in the web site, and I want to maintain consistency of look and feel of the validation
when I try and use a regular expression validator against the RadDatePicker, the validation fails.
How can I correctly hook up a client-side regular expression validator to a RadDatePicker?
Can I disable the RadDatePicker validation functionality?
If I can't disable the RadDatePicker validation functionality, I imagine that I would need to change the skin for the control. Is this correct?
Basically what I'm looking for is a regular text box that is hooked up to a calendar automatically, rather than having to code a rad window with an embedded calendar.
This is my code, the textbooks validation works, the RadDatePicker validation does not
<td noWrap align=right >Reminder Date:</td>
<td >
<table>
<tr>
<td><asp:TextBox ID="txtReminderDate" runat="server" Enabled="false"></asp:TextBox></td>
<td><asp:RequiredFieldValidator ID="reqvalReminderDate" runat="server" Enabled="false" ErrorMessage="Reminder Date is required." ControlToValidate="txtReminderDate">*</asp:RequiredFieldValidator><asp:RegularExpressionValidator ID="regvalReminderDate" runat="server" ErrorMessage="Reminder Date is invalid" Enabled=false ValidationExpression="(((0?[1-9]|1[012])/(0?[1-9]|1\d|2[0-8])|(0?[13456789]|1[012])/(29|30)|(0?[13578]|1[02])/31)/(19|[2-9]\d)\d{2}|0?2/29/((19|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00)))" ControlToValidate="txtReminderDate">* mm/dd/yyyy</asp:RegularExpressionValidator></td>
</tr>
</table>
</td>
</tr>
<tr>
<td noWrap align=right >Reminder Date:</td>
<td >
<table>
<tr>
<td><telerik:RadDatePicker ID="rdpReminderDate" Runat="server" enabled="false"
Culture="English (United States)" Skin="Default2006">
<DateInput DateFormat="MM/dd/yyyy" LabelCssClass="radLabelCss_Default2006"
Skin="Default2006">
</DateInput>
<
Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x"
Skin="Default2006"></Calendar>
</telerik:RadDatePicker></td>
<td><asp:RequiredFieldValidator ID="reqvalReminderDateRDP" runat="server" Enabled="false" ErrorMessage="Reminder Date is required." ControlToValidate="rdpReminderDate">*</asp:RequiredFieldValidator><asp:RegularExpressionValidator ID="regvalReminderDateRDP" runat="server" ErrorMessage="Reminder Date is invalid" Enabled=false ValidationExpression="(((0?[1-9]|1[012])/(0?[1-9]|1\d|2[0-8])|(0?[13456789]|1[012])/(29|30)|(0?[13578]|1[02])/31)/(19|[2-9]\d)\d{2}|0?2/29/((19|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00)))" ControlToValidate="rdpReminderDate">* mm/dd/yyyy</asp:RegularExpressionValidator>
</td>
</tr>
Thanks
Jonathan