2016-09-15 64 views
0

我正在使用引导日期选择器控件来显示日期。我想在日期选择器中隐藏以前的日期。怎么做?如何在引导日期选择器中隐藏以前的日期?

+2

http://stackoverflow.com/questions/16123056/bootstrap-datepicker-disabling-past-dates-without-current-date – Farhan

+0

可能重复[如何限制Bootstrap Datepicker中的可选日期范围?](http://stackoverflow.com/questions/11933173/how-to-restrict-the-selectable-date-ranges-in-bootstrap-datepicker) –

回答

0

使用本

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

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

JSFiddle

相关问题