I am trying to set the date of another datepicker exactly 1 year from the original datepicker when closing.
I have the following code:
$("#myDatepicker1").datepicker({ onClose: function(dateText, inst) { $("#myDatepicker2").datepicker("setDate", dateText +1y); } });
As you can guess, this does not work.
Any help would be great.
Thanks in advance!
Richard
javascript jquery jquery-ui datepicker
Richard L
source share