cyclestreets / mobileweb2011

Mobile HTML client - LEGACY site
https://oldm.cyclestreets.net/
13 stars 2 forks source link

Dates in "saved routes" showing as NaN in Android browser #36

Closed annapowellsmith closed 12 years ago

annapowellsmith commented 13 years ago

Observed in Android browser. But working fine in Chrome.

Something to do with different browsers presenting the JavaScript Date object differently? Or simple caching? Or localstorage differences?

Investigate.

si-the-pie commented 12 years ago

Confirmed this is still broken on Android htc Wildfire.

Works fine on Blackberry Playbook.

si-the-pie commented 12 years ago

Some posts I've read suggest changing - to / in the date.

This one: http://stackoverflow.com/questions/3046459/ie-date-parse-method-returns-nan-for-date-with-time-string suggests using .replace(/\-/ig, '/').split('.')[0].

si-the-pie commented 12 years ago

Fixed by...

https://github.com/cyclestreets/mobileweb/commit/f7d19bc200887fc5f855b0e46500b921f427faf1