Skip to content

Error is thrown when using DateRangeValidator #134

Description

@bbtechd

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions