quasar: [BUG] date utils not working as expected on mobile browsers

Software version

quasar-cli: 0.17.11 quasar-framework: 0.17.9 OS: Linx, OSX, Windows 10 Node: 8.10.0 NPM: 3.5.2 Browsers: Chrome, Safari, Firefox iOS: Chrome, Safary

JsFiddle (for Quasar v0.15+ only)

https://jsfiddle.net/9ecq68y7/8/

What did you get as the error?

The date utilities give out a NaN value on mobile browsers.

What were you expecting?

The date utilities should give a valid value on mobile browsers.

What steps did you take, to get the error?

The date utilities work 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 as the value of the date utilities result.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (9 by maintainers)

Most upvoted comments

I’ve changed my date.js file to reflect the changes from this pull request. If the date is formatted as listed above, everything works as expected.

From MySQL documentation: A DATETIME or TIMESTAMP value can include a trailing fractional seconds part in up to microseconds (6 digits) precision…the range for DATETIME values is ‘1000-01-01 00:00:00.000000’ to ‘9999-12-31 23:59:59.999999’

When trying to use formatDate() function on a date with 6-digit microseconds precision the error is still there.

Since I do not own an Android device, I can not use Chrome Remote debugging to check for errors while the dateFormat() function is running. I might be able to try it out during the weekend.

My approach on dealing with this bug is to remove the 6-digit millisecond precision from the date data through my php backend before sending it to my frontend for further manipulation. It does not affect my current project, but it might affect other projects that need microsecond precision.