Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

Declare todaydatedateToday variable and use Date() function to set it.. then use that variable to assign to minDate which is parameter of datepicker.

var dateToday = new Date();

var dateToday = new Date(); 
$(function() {
    $( "#datepicker" ).datepicker({
        numberOfMonths: 3,
        showButtonPanel: true,
        minDate: dateToday
    });
});

That's it... Above answer was really helpful... keep it up guys..

Declare todaydate variable and use Date() function to set it.. then use that variable to assign to minDate which is parameter of datepicker.

var dateToday = new Date();

$(function() {
    $( "#datepicker" ).datepicker({
        numberOfMonths: 3,
        showButtonPanel: true,
        minDate: dateToday
    });
});

That's it... Above answer was really helpful... keep it up guys..

Declare dateToday variable and use Date() function to set it.. then use that variable to assign to minDate which is parameter of datepicker.

var dateToday = new Date(); 
$(function() {
    $( "#datepicker" ).datepicker({
        numberOfMonths: 3,
        showButtonPanel: true,
        minDate: dateToday
    });
});

That's it... Above answer was really helpful... keep it up guys..

Source Link
Sachin
  • 831
  • 6
  • 3

Declare todaydate variable and use Date() function to set it.. then use that variable to assign to minDate which is parameter of datepicker.

var dateToday = new Date();

$(function() {
    $( "#datepicker" ).datepicker({
        numberOfMonths: 3,
        showButtonPanel: true,
        minDate: dateToday
    });
});

That's it... Above answer was really helpful... keep it up guys..