I have a datepicker field that the maxDate doesn't seem to be working on.
jQuery:
$(document).ready(function() {
$("#intorgDate").change(function() {
var myDate = new Date($("#intorgDate").val()); //ENTER VALUE IN mm/dd/yy FORMAT
var mymaxDate = new Date(myDate +7);
$('#intnewDate').datepicker({
inline: true,
dateFormat: "mm/dd/yy",
changeFirstDay: false,
defaultDate:myDate,
minDate: myDate,
maxDate: mymaxDate
});
});
});
HTML:
org date:<br>
<input type="text" id="intorgDate" /><br>
new date:<br>
<input type="text" id="intnewDate" /><br>
I have also tried setting maxDate to: maxDate: myDate 7, maxDate: myDate +7, and myDate "+7" - All with no luck.
You can see it in action here: http://jsfiddle.net/eQRqt/30/
What am I missing?