How can I set the startDate for tomorrow? I don't see an option in the documentation for Date.today so I can add one more day.
Is there a way to accomplish this?
$(function() {
$("#appointment_adate").datepicker({
format: 'yyyy-mm-d',
autoclose: true,
startDate: '+1d'
});
});
This question is related to
jquery
twitter-bootstrap
bootstrap-datepicker
1) use for tommorow's date startDate: '+1d'
2) use for yesterday's date startDate: '-1d'
3) use for today's date startDate: new Date()
If you are talking about Datepicker for bootstrap, you set the start date (the min date) by using the following:
$('#datepicker').datepicker('setStartDate', <DATETIME STRING HERE>);
If you are using bootstrap-datepicker you may use this style:
$('#datepicker').datepicker('setStartDate', "01-01-1900");
this.$('#datepicker').datepicker({minDate: 1});
minDate:0
- Enable dates in the calender from the current date. MinDate:1
enable dates in the calender currentDate+1
To Restrict date between from tomorrow and the same day next month u need to give something like
$( "#datepicker" ).datepicker({ minDate: 1, maxDate: "+1M" });
Source: Stackoverflow.com