Skip to content
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

Error is thrown when using DateRangeValidator #134

Open
bbtechd opened this issue May 16, 2024 · 0 comments
Open

Error is thrown when using DateRangeValidator #134

bbtechd opened this issue May 16, 2024 · 0 comments

Comments

@bbtechd
Copy link

bbtechd commented May 16, 2024

Hello,

when i try using the "DateRangeValidator" for the "Date Picker" element, i get the following error, if the user inserts a date, which is not in the range of the Validator.

An exception was thrown while Neos tried to render your page
Provided formatType, "datetime", is not one of allowed values.

src/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Neos_Flow_I18n_Formatter_DatetimeFormatter.php: Provided formatType, "datetime", is not one of allowed values.

The funny part is, that the Neos/Flow/I18n/Formatter/DatetimeFormatter Class expect the formType "dateTime" and not "datetime" but im not sure, why the format string is given in lowercase.

I have installed the following Versions
neos/neos 8.3.12
neos/form-builder 2.3.4

To reproduce the error

  1. Add the element "Form" in the content tree
    Bildschirmfoto 2024-05-13 um 12 43 44

  2. Add "Date picker" under "Elements" in the form
    Bildschirmfoto 2024-05-13 um 12 44 09

  3. Under "Validators", select "DateTime range validator"
    Bildschirmfoto 2024-05-13 um 12 44 34

  4. In the inspector of "DateTime range validator", select the earliest and latest date (in the example 14.05 to 18.05)
    Bildschirmfoto 2024-05-13 um 12 45 05

  5. Select a date in the form that is outside the selected period (in the example, the error is thrown for everything up to 13.05 and everything from 18.05)

  6. The error will be thrown as shown in the picture
    Bildschirmfoto 2024-05-07 um 16 00 00 (1)

Thanks in advance for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant