Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

How can i disable the past dates and 5 future date ?

$
0
0
I would like to know how i can disable the future dates. Eg, Today is 6July, it will disable the past dates + 5 of the future dates = 10July.
Thank you in advance.


<script type="text/javascript"> function checkDate(sender, args) { if ( sender._selectedDate < new Date.AddDays(5)); { alert("You cannot select a day earlier than today!"); sender._selectedDate = new Date.AddDays(5); // set the date back to the current date sender._textbox.set_Value(sender._selectedDate.format(sender._format)) } }</script>

<script type="text/javascript">// </script>


Viewing all articles
Browse latest Browse all 5678

Trending Articles