Reputation: 305
Currently I have this javascript code for my date picker
<script type="text/javascript">
$(function() {
$("#datePicker").datepicker();
$("#<%=TextBox1.ClientID %>").datepicker();
});
</script>
How to make my date picker not accept the past date? Thank you.
Upvotes: 2
Views: 205
Reputation: 3681
Try this
$("#datepicker").datepicker({ minDate: 0 });
minDate option does this work..
Upvotes: 0
Reputation: 6638
this greys out (and disables the selection) of any past date:
$(function () {
$("<%=TextBox1.ClientID %>").datepicker(
{
minDate: +0,
});
});
Upvotes: 1