How to disable the current day is to leave showing only the previous day?
Do you want to show the previous day or also wants to disable current date in datepicker?
Swatantra Kumar wrote:
I want to take the date today.
Daianne Caetano Figueredo Souza wrote:
In this case, just instantiate the class without any defaultDate value (default is null, which means today)
$( ".selector" ).datepicker();
$( ".selector" ).datepicker(
);
As, it's based on the https://jqueryui.com/datepicker, there are various options
For making previous date as default date https://api.jqueryui.com/datepicker/#option-defaultDate
$( ".selector" ).datepicker({ defaultDate: +7});
$( ".selector" ).datepicker({
defaultDate: +7
});
To disable current date, you may set maxDate to previous date https://api.jqueryui.com/datepicker/#option-maxDate
$( ".selector" ).datepicker({ maxDate: "-1d"});
maxDate: "-1d"