You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue : minimum and maximum validations do not work in RJSF JSON FORM DATE PICKER COMPONENT
This is an existing issue with the RJSF library itself.
The RJSF schema expects minimum and maximum to be number.
However, the html element with type = ‘date’ expects min to be a string of format ‘yyyy-mm-dd’ Check here
Case 1 : In the RJSF schema, if we pass minimum = dayjs().format(“YYYY-MM-DD”) i.e. a string. The datePicker works as expected but while submitting the form validation error is thrown
schema is invalid: data/properties/startDate/minimum must be number, data/properties/endDate/minimum must be number
Case 2 : If we try converting the minimum to number something like this dayjs().valueOf() -> then validation works fine but datePicker wont work as expected because min will be number and wont work on (Refer below screenshots)
Prerequisites
What theme are you using?
mui
Version
5.18.3
Current Behavior
Issue : minimum and maximum validations do not work in RJSF JSON FORM DATE PICKER COMPONENT
This is an existing issue with the RJSF library itself.
The RJSF schema expects minimum and maximum to be number.
However, the html element with type = ‘date’ expects min to be a string of format ‘yyyy-mm-dd’ Check here
Case 1 : In the RJSF schema, if we pass minimum = dayjs().format(“YYYY-MM-DD”) i.e. a string. The datePicker works as expected but while submitting the form validation error is thrown
schema is invalid: data/properties/startDate/minimum must be number, data/properties/endDate/minimum must be number
Case 2 : If we try converting the minimum to number something like this dayjs().valueOf() -> then validation works fine but datePicker wont work as expected because min will be number and wont work on (Refer below screenshots)
Expected Behavior
No response
Steps To Reproduce
JSON SCHEMA :
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: