Support

Account

Home Forums Backend Issues (wp-admin) Restrict datepicker ending date by starting date Reply To: Restrict datepicker ending date by starting date

  • Hi @yarongo

    The datepicker uses jquery UI datepicker and you can update the minDate and/or maxDate values like this:

    
    //This is an example field key. You need to use your own
    jQuery( '.acf-field-54cfe68700b24 .acf-date_picker input.input' ).datepicker( 'option', 'minDate', date.format() );
    

    so if you target a change in the first datepicker, find out the value set and use it to set the minDate with the above code it should work. I’ve done something similar before myself 🙂