Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to set jquery datetimepicker mindate is tomorrow

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.

like image 935
nmkkannan Avatar asked May 21 '14 14:05

nmkkannan


People also ask

How do you set MinDate on DateTimePicker?

Step 1: Create a DateTimePicker using the DateTimePicker() constructor is provided by the DateTimePicker class. // Creating a DateTimePicker DateTimePicker dt = new DateTimePicker(); Step 2: After creating DateTimePicker, set the MinDate property of the DateTimePicker provided by the DateTimePicker class.

How do I set a datepicker range?

To set date range of one month from current date, we will use 'M' option to "+1" for maxDate and for minDate "0" So the current date becomes the value of minDate. See below jQuery code. $(document). ready(function(){ $("#txtDate").

How do I set datepicker to current date?

To set current date in control to which jQuery UI datepicker bind, use setDate() method. Pass date object which needs to be set as an argument to setDate() method. If you want to set it to current date then you can pass 'today' as argument.

How do I disable Saturday and Sunday on datepicker?

To disable the weekends in Bootstrap Datepicker you need to set the daysOfWeekDisabled property value to [0, 6]. Then all the Weekends will be disabled in the datepicker control. Check this example.


1 Answers

Answer for this qustion:

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

it's working fine.

like image 195
nmkkannan Avatar answered Oct 12 '22 19:10

nmkkannan