Bootstrap datepicker disabling past dates without current date

前端 未结 20 2200
[愿得一人]
[愿得一人] 2020-11-27 04:55

I wanted to disable all past date before current date, not with current date. I am trying by bootstrap datepicker library \"bootstrap-datepicker\" and using following code:<

20条回答
  •  死守一世寂寞
    2020-11-27 05:36

    var nowDate = new Date();
    var today = new Date(nowDate.getFullYear(), nowDate.getMonth(), nowDate.getDate(), 0, 0, 0, 0);
    	$('#date').datetimepicker({
    		startDate: today
    	});

提交回复
热议问题