-2

how to disable dates from date picker following code

<input class="datepicker input-small" type="text" id="dpd1" required>

js code

<script>
    $(document).ready(function() {      
        $('.datepicker').datepicker({
            "autoclose": true
        });
    });
</script>
lionheart98
  • 918
  • 1
  • 10
  • 25
user2610240
  • 25
  • 1
  • 9

1 Answers1

0
<input class="datepicker input-small" type="text" id="dpd1" required>

js code

<script>
$(document).ready(function() {

    $('.datepicker').datepicker({
         minDate: 0 

    });

});

Nilesh
  • 2,407
  • 1
  • 12
  • 20
  • – Nilesh Oct 21 '13 at 11:30
  • $(document).ready(function() { $('.datepicker').datepicker({ minDate: new Date(2013, 10, 21), }); }); If this is not working, then check error in firebug. – Nilesh Oct 21 '13 at 11:33
  • not working error Uncaught TypeError: Object [object Object] has no method 'datepicker' – user2610240 Oct 21 '13 at 11:36
  • So, "jquery.datepicker.js" Scipt is not getting to your HTML code.. Check path properly.. You can check script path under "NET" Tab in firebug.. – Nilesh Oct 21 '13 at 12:01
  • i checked the pat it is correct .. see to the error (anonymous p.event.dispatch jquery.min.js:2 g.handle.h jquery.min.js:2 p.event.trigger jquery.min.js:2 (anonymous function) jquery.min.js:2 p.extend.each jquery.min.js:2 p.fn.p.each jquery.min.js:2 p.fn.extend.trigger jquery.min.js:2 p.fn.(anonymous function) jquery.min.js:2 (anonymous function) – user2610240 Oct 21 '13 at 12:21