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

    date utils on mobile browsers

    Help
    5
    12
    1362
    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.
    • J
      JazzOne last edited by

      Hi everyone,
      This is my first time posting here.

      I’ve been using quasar framework for a few months now and I’ve run into a problem with the date utilities. It works fine on every desktop browser i have used (Safari, Firefox, Chrome), but whenever I access my app from a mobile browser (Safari or Chrome on IOS) I get a NaN value where the date utilities result is being displayed.

      Anyone has any similar behaviour? Is there any way to fix it?

      1 Reply Last reply Reply Quote 0
      • Shone
        Shone last edited by

        Hi @JazzOne
        Can you share some code with us please, maybe create a JSFiddle with an example.

        You can fork this jsfiddle https://jsfiddle.net/rstoenescu/waugrryy/

        1 Reply Last reply Reply Quote 0
        • J
          JazzOne last edited by

          How can I access the Quasar date utils in jsfiddle?

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

            Quasar.utils.date

            Scott

            1 Reply Last reply Reply Quote 0
            • J
              JazzOne last edited by

              https://jsfiddle.net/kipouras/eywraw8t/451378/

              1 Reply Last reply Reply Quote 0
              • J
                JazzOne last edited by

                Or if you want a simpler version of the code:
                https://jsfiddle.net/kipouras/9ecq68y7/4/

                1 Reply Last reply Reply Quote 0
                • J
                  JazzOne last edited by

                  Works on all desktop systems I’ve tried (Linux, Mac OS, Windows) but not on IOS mobile browsers

                  1 Reply Last reply Reply Quote 0
                  • rstoenescu
                    rstoenescu Admin last edited by

                    Use slash ("/") instead of dash ("-") for date separator, always, due to the many bugs in JS Date() object.

                    Bad: 2018-10-10
                    Good: 2018/10/10

                    1 Reply Last reply Reply Quote 1
                    • J
                      JazzOne last edited by

                      I’ve replaced the dash with a slash but the problem is still there.
                      https://jsfiddle.net/9ecq68y7/8/

                      1 Reply Last reply Reply Quote 0
                      • Hawkeye64
                        Hawkeye64 last edited by

                        @rstoenescu Definitely a bug. I accessed the same link (https://jsfiddle.net/9ecq68y7/8/) from desktop and it works - “14222 minutes ago” is results. Go to the link on your mobile and you get “NaN minutes ago”.

                        1 Reply Last reply Reply Quote 0
                        • rstoenescu
                          rstoenescu Admin last edited by

                          Please log a bug so I can take care of it. Thank you!

                          1 Reply Last reply Reply Quote 0
                          • J
                            JazzOne last edited by

                            I’ve opened a new Issue on github (#2748)

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