how to set jquery datetimepicker mindate is tomorrow

核能气质少年 提交于 2020-12-08 05:44:10

问题


My jquery code:

$('#DatePicker').datetimepicker({
        timepicker : false,
        format : 'd.m.Y',
        minDate : 0
    });

In this jquery i am using datetimepicker plugin.i want set min date is tomorrow date.in this code i set min date is today.how to set min date is tomorrow date.


回答1:


Answer for this qustion:

$('#DatePicker').datetimepicker({
    timepicker : false,
    format : 'd.m.Y',
    minDate : '-1969/12/31'
});

it's working fine.




回答2:


Try this:

 $("input.DateFrom").datepicker({
    minDate: 1 
 });

Demo

Update:

 var tomorrow = new Date(today.getTime() + 24 * 60 * 60 * 1000);
 $('#DatePicker').datetimepicker({
    timepicker : false,
    format : 'd.m.Y',
    startDate: tomorrow
});



回答3:


This worked for me:

minDate : "+1"



回答4:


Try this.

$('#DatePicker').datetimepicker({
    timepicker : false,
    format : 'd.m.Y',
    minDate:'+1970/01/02'
});

I guess it will do what you want.



来源:https://stackoverflow.com/questions/23785509/how-to-set-jquery-datetimepicker-mindate-is-tomorrow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!