Here's my code:
<asp:TemplateField HeaderText="* License Setup Date">
<EditItemTemplate>
<asp:RequiredFieldValidator ID="LicenseSetupDateRequired"
ErrorMessage="License Setup Date can't be blank."
ValidationGroup="EditClientDetails"
ControlToValidate="BeginDate"
Text="*!"
Display="Dynamic"
runat="server"></asp:RequiredFieldValidator>
<asp:RangeValidator ID="LicenseSetupDateRange"
ErrorMessage="License Setup Date needs to be a date between 01/01/2000 and 12/31/2200"
ValidationGroup="EditClientDetails"
ControlToValidate="BeginDate"
MinimumValue="01/01/2000"
MaximumValue="12/31/2002"
Type="Date"
Text="*!" Display="Dynamic" runat="server"></asp:RangeValidator>
<asp:TextBox ID="BeginDate" MaxLength="10"
Text='<%# Bind("BeginDate", "{0:MM/dd/yyyy}") %>'
runat="server"></asp:TextBox>
<span class="fieldNote">(mm/dd/yyyy format)</span>
</EditItemTemplate>
</asp:TemplateField>
And the results:
- 01/01/2008 Doesn't pass
- 02/02/2008 Doesn't pass
- 11/11/2000 Passes
- 08/08/2001 Passes
What am I missing here?