change the second datepicker's minDate depending the first one
问题 I have two datePickers in the same page and I wanna change the second datepicker's minDate depending the first one. Here is my code: $("#datepickerDepart" ).datepicker({ dateFormat: "mm-dd-yy", minDate: 0, onSelect: function(dateText, inst) { var m = dateText.substring(0,2); var d = dateText.substring(3,5); var y = dateText.substring(6,10); console.log(d); console.log(m); console.log(y); var newDate = new Date(y,m-1,d); console.log(newDate); $('#datepickerReturn').val(""); $('