doctordick / DoctorDick

A React Native application that empowers gay men to stay on top of their sexual health.
https://www.askdoctordick.com
5 stars 2 forks source link

bug: NSDate cannot be converted to a date #37

Closed henryw4k closed 8 years ago

henryw4k commented 8 years ago

When picking a date for the first time, there is an error. This error occurs when the simulator isn't hooked up to the JS debugger. screen shot 2016-09-02 at 9 14 42 pm

henryw4k commented 8 years ago

looks like when hooked up to the debugger, date is interpreted properly. getTime() will fix our issue. fixed in 2e521c7

henryw4k commented 8 years ago

The getTime() method returns the numeric value corresponding to the time for the specified date according to universal time

dsernst commented 8 years ago

Nice

dsernst commented 8 years ago

What's the status on this?

henryw4k commented 8 years ago

status: unresolved, my fix didn't fix it :/ Will continue tinkering with it later when I have time.

kchia commented 8 years ago

Looks like converting the date to ISO format using toISOString() fixes the problem.

kchia commented 8 years ago

Fixed in https://github.com/doctordick/DoctorDick/commit/260fe9de2b775aca0e3810bedbf29221ba7a3f8e

henryw4k commented 8 years ago

awesome!! Thanks for fixing Hou!