Good morning, I would like to dynamically control the maxDate of my datpike. For example: I have a date in my form in a text box with a value of 20/12/12.
I tried this, but did not work, the calendar disables maxDate from the date I received in my text box. Could you help me with this:
$(function() { var date = new Date(); var m = date.getMonth(), d = date.getDate(), y = date.getFullYear(); $("#Panel2nrFecha").datepicker({ minDate: new Date(y, m, d), maxDate: $("#Panel2nrTextBox1").val(), dateFormat: "dd/mm/y", defaultDate: "+1w", changeMonth: true, numberOfMonths: 3 }); });
source share