Home › Forums › General Issues › min date & max date on datepicker field › Reply To: min date & max date on datepicker field
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.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.