Manually entering a date in Umbraco Forms gives strange result
Hi,
I'm running into an issue for what I can't find the solution in the docs.
We have a form in Umbraco (Umbraco V10.8.3 and Forms 10.4.0) where we have a datepicker.
If you enter a date in manually it look like it just picks a random date... I couldn't find any logic up until now.
My desired behaviour is that a dutch user can manually enter a date like this "31-01-2024".
When I enter that date right now it displays as follows: "31 januari 2001"
When I enter this: "2024-01-31" it displays this: "20 januari 2024"
When I enter this: "2024-31-01" it also displays this: "20 januari 2024"
I just cant seem to find the logic or the documentation on how to set this up.
I guess so, it depends on the theme. Sorry, not familiar with the Forms frontend options very much. The theme is entirely replaceable so that might be an option if you need more control.
Not sure how difficult it would be to make it behave though, seems like 2024-01-31 should be the easiest one to convert, surprised that it's the one that goes wrong.
Possibly it could have something to do with the browser language or the <html lang= attribute having an unexpected locale?
Manually entering a date in Umbraco Forms gives strange result
Hi,
I'm running into an issue for what I can't find the solution in the docs.
We have a form in Umbraco (Umbraco V10.8.3 and Forms 10.4.0) where we have a datepicker.
If you enter a date in manually it look like it just picks a random date... I couldn't find any logic up until now.
My desired behaviour is that a dutch user can manually enter a date like this "31-01-2024".
When I enter that date right now it displays as follows: "31 januari 2001" When I enter this: "2024-01-31" it displays this: "20 januari 2024" When I enter this: "2024-31-01" it also displays this: "20 januari 2024"
I just cant seem to find the logic or the documentation on how to set this up.
Not an answer, but you will need to look into whatever datepicker library you're using I guess, since that's the one formatting the final date.
I'm using the out of the box one. I think it's pickaday?
I guess so, it depends on the theme. Sorry, not familiar with the Forms frontend options very much. The theme is entirely replaceable so that might be an option if you need more control.
Not sure how difficult it would be to make it behave though, seems like
2024-01-31
should be the easiest one to convert, surprised that it's the one that goes wrong.Possibly it could have something to do with the browser language or the
<html lang=
attribute having an unexpected locale?is working on a reply...