<div class="demo">
<p>Date: <input type="text" id="datepicker"></p>
</div><!-- End demo -->
$(function() {
$( "#datepicker" ).datepicker({
changeYear: true,
minDate: '-3M',
maxDate: '+28D',
});
});
I want to give admin power so that they can dynamically set the maximum date from the drop down. For e.g - if admin selects 3 from drop down it should automatically reflect in maxDate.