No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Strange date format issue

    Help
    2
    2
    170
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      bambinou last edited by

      Hello,

      No idea if this is a bug in Quasar but I am having a problem with the date reformat.

      I have this from the input mask: DD-MM-YYYY HHπŸ‡²πŸ‡²ss which gives me:

      11-09-2019 00:00:00
      

      This is how I need to show the date in the input fields to my customers.

      But, for my calculations to work, I need to reformat the date to:

      YYYY-MM-DD HH:mm:ss
      

      I tried:

      date.formatDate(initialDate, 'YYYY-MM-DD HH:mm:ss');
      

      It looks like it works until you set the calendar to a day higher than 12, it gives β€œNaN”. Meaning that you think the middle number is MONTHS when in fact it is in days. The above conversion does not work at all.

      Any idea how to reconvert properly the date using Quasar from DD-MM-YYYY HHπŸ‡²πŸ‡²ss to YYYY-MM-DD HHπŸ‡²πŸ‡²ss

      Thank you.

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by

        If this is still an issue, can you try to replicate in a codepen?

        Thanks.

        Scott

        1 Reply Last reply Reply Quote 0
        • First post
          Last post