0
日付を選択中にBootstrap datepickerに過去の日付を無効にしたいとします。Bootstrap Datepickerで過去の日付を無効にする方法
ドキュメント(Bootstrap Datepicker)では、過去の日付を無効にする方法はありませんでした。
私はこれらのようなものを試しましたが、それは私のためには機能しませんでした。
$(document).ready(function(){
var todayTmp=new Date();
var today=new Date(todayTmp.getFullYear(), todayTmp.getMonth(), todayTmp.getDate(), 0, 0, 0, 0);
$('#vDate').datepicker({
onRender: function(date){
return date.valueOf() < today.valueOf() ? 'disabled' : '';
}
});
});
どのように修正するのですか?
[現在の日付せずに過去の日付を無効にするブートストラップ日付ピッカー](https://stackoverflow.com/questions/16123056/bootstrap-datepicker-disabling-past-dates-without-の可能性のある重複現在の日付) –