Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Frans de Jong 550 posts 1862 karma points MVP 4x c-trib
    Feb 02, 2024 @ 10:35
    Frans de Jong
    0

    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.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Feb 06, 2024 @ 08:45
    Sebastiaan Janssen
    0

    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.

  • Frans de Jong 550 posts 1862 karma points MVP 4x c-trib
    Feb 06, 2024 @ 08:47
    Frans de Jong
    0

    I'm using the out of the box one. I think it's pickaday?

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Feb 06, 2024 @ 10:53
    Sebastiaan Janssen
    0

    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?

Please Sign in or register to post replies

Write your reply to:

Draft