so basically a user can click on the Add button then , it will add another row of textbox which have the same function
<asp:TextBox runat="server" ID="txtDate1" />
<ajaxtoolkit:calendarextender runat="server" ID="calExtender1"
TargetControlID="txtDate1" OnClientDateSelectionchanged="CheckDateEalier" Format="dd/MM/yyyy"/>
<asp:Button ID="btnDate3" Text="Add" Width="20px" runat="server" />
<asp:Button ID="submit" Text="Submit" Width="20px" runat="server" />
this is the javascript i use to check the date
<script type="text/javascript">
function CheckDateEalier(sender,args) {
if (sender._selectedDate < new Date()) {
alert("You cannot select a day before today or today!");
sender._selectedDate = new Date();
// set the date back to the today
// sender._textbox.set_Value(sender._selectedDate.format(sender._format))
sender._textbox.set_Value(null)
}
}
</script>

New Topic/Question
Reply



MultiQuote




|