Datepicker max date

So, I have a date picker, and I want to get the maximum date. I have something like this

  $ ("#datepicker") .datepicker ({minDate: -20, maxDate: "+ 1M + 15D"}); 

How can I get the maxDate value formatted in MM / DD / YYYY?

Thanks for helping the guys

+4
source share
2 answers
$('#datepicker').datepicker( "option", "dateFormat", 'mm/dd/yyyy' ); 

And then specify your maxdate in mm / dd / yyyy.

+6
source

I'm sure this is what I used: { maxDate: '+2m +2w +4y' }

+2
source

All Articles