Strange date format issue

  • 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.

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



Log in to reply