Calendar date picker - Default behavior
Click on the calendar image near the textbox.
Select a date, and then try to select the same date again.
Date will be deselected. This is the default Calendar behavior.
|
|
 << | Tuesday, May 13, 2008 | >> |
|
|
ASP.NET
<ASP:TextBox runat="server" ID="txtDate"></ASP:TextBox>
<obout:Calendar runat="server" DatePickerMode="true" TextBoxId="txtDate"> </obout:Calendar> | | |
Calendar date picker - Custom behavior
Click on the calendar image near the textbox.
Select a date, and then try to select the same date again.
Date will remain selected.
|
|
 << | Tuesday, May 13, 2008 | >> |
|
|
ASP.NET
<ASP:TextBox runat="server" ID="txtDate"></ASP:TextBox>
<obout:Calendar runat="server" DatePickerMode="true" TextBoxId="txtDate" OnClientDateChanged="onDateChange"> </obout:Calendar>
<script type="text/javascript" language="JavaScript"> var selDate = null; function onDateChange(sender, selectedDate) { if (selectedDate == null && selDate != null) sender.setDate(new Date(selDate.getFullYear(), selDate.getMonth(), selDate.getDate()), new Date(selDate.getFullYear(), selDate.getMonth(), selDate.getDate())) if (selectedDate != null) selDate = selectedDate; } </script>
| | |
| "WOW! Now you are cooking with gas! oBout rocks my world. You guys are the best.
Kudos! I will continue to recommend you to all of my developer buddies." |
Joshua Richards |
| Liquid Circuit, LLC |
| | |
|