SearchKit/Form: exposing a Date custom field has invalid year range
To reproduce on dmaster:
- Create a new Custom Field (ex: Lucky Day), type 'Date', searchable, by range.
Optionally you can update a contact, so that at least one has a Lucky Day, but it is not a requirement to reproduce the bug. For extra luck, I used 2021-08-13.
-
Create a SearchKit that lists Contacts, and display the field
-
Create a Form for that Search, and expose the Lucky Day field as a filter. Give the form an URL to view the page.
Then go view the form, and notice how the date filter only lets you select dates in 2021:
If you go back to the custom field configuration, and set a number of years in the "Dates may be up to" prior/after, then the filter works correctly. However, having these fields empty usually means that there are no restrictions (or they default to -20/+10 years).