My clients who need to enter start and end dates (well into the future) find it useful if pop-up calendar 2 starts at the date set by popup calendar 1 (and not before).
For years the code below has worked, on several different Web sites:
$( "#start" ).datepicker({ dateFormat: 'yy-mm-dd' });
$( "#end" ).datepicker({
dateFormat: 'yy-mm-dd',
beforeShow: function() {
dt = $( "#start" ).datepicker( 'getDate' );
return { minDate: dt }; // a JS object - dt could be 'null' (which is OK)
I cannot get it to work using current versions of jQuery UI. I have tried some general beforeShow solutions suggested on this Web site, but none of them solves my problem.
Can anyone suggest a solution? Or is there a solution which uses even less code than the above?
dtshould probably be a local variable), the problem is elsewhere. Could you reproduce this in a MCVE?