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
I'm developing a linked dates component and for that I would like to use the native date and time selection inputs, datetime-local.
The objective is that in the change event of the "start input", this value is set in the "min" attribute of the "end input". And likewise, in the change event the "end input", the value is set in the "max" attribute of the "start input".
I do this to take advantage of the component's native behavior that blocks the selection of some dates according to the min/max fields. This is working wonderfully.
The problem comes from how parsley uses the min and max attributes. Because (and I can't figure out why) it can't correctly validate if one date is less/greater than another in the format this native input uses, "YYYY-MM-DDTHH:mm".
In the images below I exemplify what happened.
The code:
The generated output:
Start input limited to dates below than "2023-07-20T10:00"
End input limited to dates higher than "2023-07-10T10:00"
The error: ]
The text was updated successfully, but these errors were encountered:
What kind of issue is this? (put 'x' between the square brackets)
Question. This issue tracker is not the place for questions. If you want to ask how to do
something, or to understand why something isn't working the way you expect it to, use
http://stackoverflow.com/questions/ask .
Provide working code, starting from http://codepen.io/marcandre/pen/jqbzyN?editors=101.
We monitor the tag
parsley.js
.Bug report. If you’ve found a bug, you must provide a minimal example in a CodePen,
starting from http://codepen.io/marcandre/pen/jqbzyN?editors=101 .
Feature Request. Make sure there's no good way to do what you want first;
consider asking on http://stackoverflow.com/questions/ask first.
I'm developing a linked dates component and for that I would like to use the native date and time selection inputs, datetime-local.
The objective is that in the change event of the "start input", this value is set in the "min" attribute of the "end input". And likewise, in the change event the "end input", the value is set in the "max" attribute of the "start input".
I do this to take advantage of the component's native behavior that blocks the selection of some dates according to the min/max fields. This is working wonderfully.
The problem comes from how parsley uses the min and max attributes. Because (and I can't figure out why) it can't correctly validate if one date is less/greater than another in the format this native input uses, "YYYY-MM-DDTHH:mm".
In the images below I exemplify what happened.
The code:
The generated output:
Start input limited to dates below than "2023-07-20T10:00"
End input limited to dates higher than "2023-07-10T10:00"
The error:
]
The text was updated successfully, but these errors were encountered: