0

I am using boot strap date picker control for displaying date. I want to hide the previous dates in date picker. How to do it?

Gowthami
  • 27
  • 7
  • 2
    http://stackoverflow.com/questions/16123056/bootstrap-datepicker-disabling-past-dates-without-current-date – Farhan Sep 15 '16 at 10:28
  • Possible duplicate of [How to restrict the selectable date ranges in Bootstrap Datepicker?](http://stackoverflow.com/questions/11933173/how-to-restrict-the-selectable-date-ranges-in-bootstrap-datepicker) – Mehdi Dehghani Sep 15 '16 at 10:46

1 Answers1

0

use this

var date = new Date();
date.setDate(date.getDate()-1);

$('#sandbox-container input').datepicker({
    autoclose: true,
    startDate: date
});

JSFiddle

Kumar
  • 270
  • 1
  • 4
  • 17