Tuesday 24 July 2012

disable past dates in datepicker jquery

In this blog I will show you how to disable all the past dates (less than or older than today) of jQuery Datepicker. To accomplish it I have used the minDate property of the jQuery datepicker and set it to current date to make that happen.

<script type="text/javascript">
                            $(function () {
var date = new Date();
var currentMonth = date.getMonth();
var currentDate = date.getDate();
var currentYear = date.getFullYear();
$('#deliveron').datepicker({
minDate: new Date(currentYear, currentMonth, currentDate)

});
});
                           
                                                       </script>

1 comment:

  1. Thanks for sharing the important points of view with us. It is really very nice blog which describes how to icici payment gateway plugin

    ReplyDelete

Note: only a member of this blog may post a comment.