react-kronos icon indicating copy to clipboard operation
react-kronos copied to clipboard

Incompatible with latest moment-range

Open tabby-or-not opened this issue 6 years ago • 1 comments

react-kronos appears to be incompatible with the latest version of moment-range - crashing with a Type Error: range is not a function

I believe the error is coming from https://github.com/dubert/react-kronos/blob/10eab390ee66af45fad324bd4c7bdbf61175c45a/src/calendar.js#L109

The new syntax for moment-range is

import Moment from 'moment'
import { extendMoment } from 'moment-range'

const moment = extendMoment(Moment)

I have fixed moment-range to v2.2.0 in our project as a temporary fix.

tabby-or-not avatar Jul 20 '18 00:07 tabby-or-not

Thanks for bringing this up! Should be able to fix it pretty quickly.

felixakiragreen avatar Jul 20 '18 19:07 felixakiragreen