felixakiragreen / react-kronos

A fast, intuitive, and elegant date and time picker for React.
https://felixakiragreen.github.io/react-kronos/
MIT License
90 stars 28 forks source link

Incompatible with latest moment-range #74

Open tabby-or-not opened 6 years ago

tabby-or-not commented 6 years ago

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.

felixakiragreen commented 6 years ago

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