Everything I've seen concerning this suggests that this code should validate correctly when your focus leaves RadDateInput2. Instead, valid dates which are later than the initial date produce errors - in fact, any valid date entered in the second box produces a validation error. What am I doing wrong?
<%@ Page Language="C#" AutoEventWireup="true" Codebehind="Test.aspx.cs" Inherits="TestProject.Test" %> |
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
<html xmlns="http://www.w3.org/1999/xhtml"> |
<head runat="server"> |
<title>Untitled Page</title> |
</head> |
<body> |
<form id="form1" runat="server"> |
<div> |
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> |
Date 1: |
<telerik:RadDateInput ID="RadDateInput1" runat="server" SelectedDate="09/19/2008" /> |
<br /> |
<br /> |
Date 2: |
<telerik:RadDateInput ID="RadDateInput2" runat="server" /> |
<br /> |
<asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="Date 2 must be greater than or equal to date 1." |
ControlToCompare="RadDateInput1" ControlToValidate="RadDateInput2" Type="Date" |
Operator="GreaterThanEqual" /> |
</div> |
</form> |
</body> |
</html> |