i’d like to know how to apply min & max dates on datepicker fields based on the input of another datepicker field. for example, if datepicker 1 shows dates only after today. let’s say the datepicker 1 is set to May 20. datepicker 2 can only show dates 4-24 days after the input in datepicker 1 (which is May 24 to June 13). the js reference in acf documentation didn’t do much help to me. can anyone point me to the right direction? thanks.
You would need to build custom JavaScript https://www.advancedcustomfields.com/resources/adding-custom-javascript-fields/ and use the ACF JS API https://www.advancedcustomfields.com/resources/javascript-api/
You would need to add actions to detect changes in the fields you are interested in. You’d also have to modify the datepicker using https://www.advancedcustomfields.com/resources/javascript-api/#actions-date_picker_init. And you’d need to interact directly with the jQuery date picker https://jqueryui.com/datepicker/
Sorry I can’t give you much help as far as coding goes. The only example I know of of working with the date picker is here https://support.advancedcustomfields.com/forums/topic/autocomplete-end-date-when-start-date-is-selected-in-jquery-date-picker/ and that is old. There are no examples of doing this with the new ACF JS API.
thanks @hube2 . will try looking at the links you sent.