climboid
climboid

Reputation: 6952

datepicker max date

So I have a date picker and I want to get back a max date. I have somthing like this

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

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

Thanks for your help guys

Upvotes: 4

Views: 9517

Answers (2)

wanovak
wanovak

Reputation: 6127

$('#datepicker').datepicker( "option", "dateFormat", 'mm/dd/yyyy' );

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

Upvotes: 6

Phil
Phil

Reputation: 11175

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

Upvotes: 2

Related Questions