Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
[Panel] Date field min/max settings not validated #1801
Describe the bug
While the dropdown limits the years to choose from (only if
Desktop (please complete the following information):
This is the original thread about the issue I face: https://forum.getkirby.com/t/how-to-use-min-max-for-date-fields/14376
Thanks for reporting this @texnixe!
I downloaded v3.2.1-rc1 and used the above example and my origonal example. I'm still able to select invalid dates and to save them. Am I doing something wrong @bastianallgeier?
I tried US and German date format for min/max property.
Hm, even with that field, it works for me.
Is your page a draft? Drafts are not validated. What happens, if you want to publish it?
The thing is that it probably wouldn't make sense or wouldn't even be possible to limit the days and months shown in a way that would completely make it impossible to select a wrong date - depending on what date ranges you have selected. Let's say you have a date range from 01.01.2015 to 25.06.2017, in that case, you would have to show all days and months. Still, selecting a wrong date like 30.08.2017 would be possible, so validating the date is the only way.
To help the user choosing a correct data, some help text under the field would be useful though.
True, I forgot that validation happens on publishing level, not on draft level, although it happens with