-
-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Required date range not working #2011
Comments
This is more of an issue that you can't store a range (multiple dates) for a date field. It only allows for a single date. Server-side validation is going to try and parse a range as a single date, which will fail, stripping the value for the field, after which it's going to detect that the field has no value. Date ranges aren't currently supported whether they're required on not, sorry. The resolution would be to roll your own Flatpikr instance with a Single-Line Text field so you can store the date as a ranged string. |
Describe the bug
If you create a date field and set it as a required field and use it with flatpickr you cannot submit the form because the flatpickr input field has the required attribute but does not get a value but only the hidden field.
After the daterange is filled and I try to submit the form I get this error:
Steps to reproduce
range
Form settings
Craft CMS version
Craft Solo 5.2.10
Plugin version
3.0.0
Multi-site?
No
Additional context
No response
The text was updated successfully, but these errors were encountered: