date utils on mobile browsers
-
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?
-
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/
-
How can I access the Quasar date utils in jsfiddle?
-
Quasar.utils.date
Scott
-
-
Or if you want a simpler version of the code:
https://jsfiddle.net/kipouras/9ecq68y7/4/ -
Works on all desktop systems I’ve tried (Linux, Mac OS, Windows) but not on IOS mobile browsers
-
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 -
I’ve replaced the dash with a slash but the problem is still there.
https://jsfiddle.net/9ecq68y7/8/ -
@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”.
-
Please log a bug so I can take care of it. Thank you!
-
I’ve opened a new Issue on github (#2748)