Set minimum and/or maximum date to date fields


I’m setting up a contact form with two date fields, indicating minimum and maximum date respectively. I’m wondering, is there a way to limit the value of those fields (min and max value)? Maybe a code snippet to add in functions.php?

I’ve already tried to look it up, but I haven’t found anything, so I’m asking for some help here.

Thank you!

Hi Damiano,

This is possible with our GP Limit Dates Perk without writing any codes. Please check out the documentation for more information.

Hi Samuel,

Thanks for the info, but I’m looking for something much simpler, this is the only use case I’ve encountered so far, so I was wondering if there are some code snippets to get started with.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.