Hi all, I want to do something whereby there will be a starting date and ending date. Is there any way whereby I can make sure that the user cannot select the ending date that is before the starting date. This means that I must make sure that the ending date will always be more than the starting date.
Is there any way whereby I can modify the following codes for me to show a error message whenever the user chose a ending date that is before the starting date?
<asp:CalendarExtender ID="TextBox2_CalendarExtender" runat="server"
Enabled="True" TargetControlID="TextBox2" Format="MM-dd-yyyy" OnClientDateSelectionChanged="dateselect"">
</asp:CalendarExtender>
<script>
function dateselect(ev)
{
var calendarBehavior1 = $find("Calendar1");
var d = calendarBehavior1._selectedDate;
var now = new Date();
calendarBehavior1.get_element().value = d.format("MM/dd/yyyy") + " "+now.format("HH:mm:ss")
}
</script>