<script runat="server">
protected void Button1_Click(object sender, EventArgs e)
{
if (PeterBlum.DES.Globals.WebFormDirector.IsValid)
{
}
}
</script>
<h2>Basic setup</h2>
Start must be less than or equal to the End date. Enter similar dates. A shortcut: type T for today into each textbox.
Use the up and down arrows to advance the date.<br/><br/>
Start
<des:DateTextBox id="StartDateTextBox" runat="server" RangeEndControlID="EndDateTextBox" ></des:DateTextBox>
<des:DataTypeCheckValidator ID="StartDTC" runat="server" ControlIDToEvaluate="StartDateTextBox" ErrorMessage="Bad data" />
<br/>
End
<des:DateTextBox id="EndDateTextBox" runat="server"></des:DateTextBox>
<des:DataTypeCheckValidator ID="EndDTC" runat="server" ControlIDToEvaluate="EndDateTextBox" ErrorMessage="Bad data" />
<br/>
<br/>
<h2>RangeMinDays=2</h2>
Start must be at least two days less than the End date. Enter similar dates. A shortcut: type T for today into each textbox.
Use the up and down arrows to advance the date.<br/><br/>
Start
<des:DateTextBox id="StartDateTextBox2" runat="server" RangeEndControlID="EndDateTextBox2" RangeMinDays="2" ></des:DateTextBox>
<des:DataTypeCheckValidator ID="StartDTC2" runat="server" ControlIDToEvaluate="StartDateTextBox2" ErrorMessage="Bad data" />
<br/>
End
<des:DateTextBox id="EndDateTextBox2" runat="server"></des:DateTextBox>
<des:DataTypeCheckValidator ID="EndDTC2" runat="server" ControlIDToEvaluate="EndDateTextBox2" ErrorMessage="Bad data" />
<br/>
<br/>
<h2>RangeFillInBlank and RangeEndSetsMinDate</h2>
Enter a date into the start date. It updates the empty End DateTextBox. Popup the calendar for the End DateTextBox
to see the calendar will not allow selecting dates below the start date. <br/><br/>
Start
<des:DateTextBox id="StartDateTextBox3" runat="server" RangeEndControlID="EndDateTextBox3"
RangeFillInBlank="True" RangeEndSetsMinDate="True" ></des:DateTextBox>
<des:DataTypeCheckValidator ID="StartDTC3" runat="server" ControlIDToEvaluate="StartDateTextBox3" ErrorMessage="Bad data" />
<br/>
End
<des:DateTextBox id="EndDateTextBox3" runat="server"></des:DateTextBox>
<des:DataTypeCheckValidator ID="EndDTC3" runat="server" ControlIDToEvaluate="EndDateTextBox3" ErrorMessage="Bad data" />
<br/>
<des:RangeValidator ID="RangeValidator1" runat="server" ControlIDToEvaluate="EndDateTextBox3"
ErrorMessage="Out of range">
</des:RangeValidator>
<des:CompareTwoFieldsValidator ID="CompareTwoFieldsValidator1" runat="server" ControlIDToEvaluate="StartDateTextBox3"
SecondControlIDToEvaluate="EndDateTextBox3" Operator="LessThan" ErrorMessage="Make Start < End Date" />
<br/>
<br/>
<des:Button ID="Button1" runat="server" /><br/>