dschuett
dschuett

Reputation: 300

jQuery Date Picker disable all days up to 7 days away

I'm trying to find a way to disable all dates that are not at least 7 days away from the current date. The following just allows the next 7 days. I need to disable the next 6 days from the current date and allow everything after that. Is there a way accomplish this?

$('#intmoveDate').datepicker({
inline: true,
dateFormat: "mm/dd/yy",
changeFirstDay: false,
minDate: 0,
maxDate: "7D"

});

Thanks in advance.

Upvotes: 2

Views: 4284

Answers (1)

jivetek
jivetek

Reputation: 256

This should give you a minimum date of 7 days away with no maxmimum date.

$('#intmoveDate').datepicker({
    inline: true,
    dateFormat: "mm/dd/yy",
    changeFirstDay: false,
    minDate: +7
});

Upvotes: 4

Related Questions