React-calendar-timeline: OnMove gives NAN for new starttime

Created on 4 May 2018  路  5Comments  路  Source: namespace-ee/react-calendar-timeline

If you use date as values for item starttime and item endtime, then OnItemMove will give you NaN as result for the new start time.

If you pass unix timestamps then things work.

bug pending-release

Most helpful comment

I feel like this timeline should only support unix timestamps in ms as the input. marshaling between strings, Date object, Moment and milliseconds is a pain.

All 5 comments

I ran into a similar issue.

  • Used a Date object for starttime and endttime.
  • onCanvasClick was returning a Nan.

Solved with using unix timestamps in milliseconds for starttime and endttime

I feel like this timeline should only support unix timestamps in ms as the input. marshaling between strings, Date object, Moment and milliseconds is a pain.

Simplify, simplify and simplify!
Fully agree.

Fix should go out in next release

Fixed in 0.17.0

Was this page helpful?
0 / 5 - 0 ratings