Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 362
climboid Avatar asked Feb 23 '23 15:02

climboid


1 Answers

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

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

like image 180
wanovak Avatar answered Mar 03 '23 19:03

wanovak