Hello, I want my Start Time and End TIme should not be equal to each other and I want the End TIme should not go beyond the Start TIme. For example:
Start Time = 8:30 AM
End Time = 8:00 AM
The above example should have an error because the End Time go beyond the Start Time. So I want to fix it, thanks
My HTML code:
Time In:
<cc1:MaskedEditValidator ID="mevStartTime" runat="server" ControlExtender="meeStartTime"
ControlToValidate="txtStartTime" IsValidEmpty="False" EmptyValueMessage="Time is required "
InvalidValueMessage="Time is invalid" Display="Dynamic" EmptyValueBlurredText="Time is required "
InvalidValueBlurredMessage="Invalid Time" ValidationGroup="MKE" ForeColor="Red" />
<asp:TextBox ID="txtStartTime" runat="server" Text='<%# Bind("StartTime", "{0:t}") %>'
class="form-control" required></asp:TextBox>
<div align="right">
<asp:Label ID="lblStartTimeEdit" runat="server" Text="Press 'A' or 'P' to switch AM/PM"></asp:Label>
</div>
<cc1:MaskedEditExtender ID="meeStartTime" runat="server" AcceptAMPM="true" MaskType="Time"
Mask="99:99" MessageValidatorTip="true" OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError"
ErrorTooltipEnabled="true" UserTimeFormat="None" TargetControlID="txtStartTime"
InputDirection="LeftToRight" AcceptNegative="Left">
</cc1:MaskedEditExtender>
Time Out:
<cc1:MaskedEditValidator ID="MaskedEditValidator1" runat="server" ControlExtender="meeStartTime"
ControlToValidate="txtEndTime" IsValidEmpty="False" EmptyValueMessage="Time is required "
InvalidValueMessage="Time is invalid" Display="Dynamic" EmptyValueBlurredText="Time is required "
InvalidValueBlurredMessage="Invalid Time" ValidationGroup="MKE" ForeColor="Red" />
<asp:TextBox ID="txtEndTime" runat="server" Text='<%# Bind("StartTime", "{0:t}") %>'
class="form-control" required></asp:TextBox>
<div align="right">
<asp:Label ID="Label1" runat="server" Text="Press 'A' or 'P' to switch AM/PM"></asp:Label>
</div>
<cc1:MaskedEditExtender ID="MaskedEditExtender1" runat="server" AcceptAMPM="true" MaskType="Time"
Mask="99:99" MessageValidatorTip="true" OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError"
ErrorTooltipEnabled="true" UserTimeFormat="None" TargetControlID="txtEndTime"
InputDirection="LeftToRight" AcceptNegative="Left">
</cc1:MaskedEditExtender>
Thanks~