Comments (17)
When I use yarn
, this error occurs. delete node_modules
and npm install
solve the problem.
from react-daterange-picker.
pedestrian question... BUT.... do you have moment
and moment-range
imported
from react-daterange-picker.
Also ensuring that your babel loader isn't accidentally being run over third party dependencies would be a good sanity check too
from react-daterange-picker.
For anyone still landing on this. It was fixed for us if you properly extend moment with moment range (see moment range docs)
import Moment from 'moment'
import { extendMoment } from 'moment-range'
const moment = extendMoment(Moment);
from react-daterange-picker.
👍 Me too
from react-daterange-picker.
@nickbrit Are you still facing this issue?
from react-daterange-picker.
I am seeing this as of today. Any updates?
from react-daterange-picker.
Have the same issue when using the module from npm.
But if I used the source from github it seems to work.
Also find out it's not suitable if you want only a single picker.
So I switched now to https://hacker0x01.github.io/react-datepicker/ it works perfect with redux-form
from react-daterange-picker.
I get the similar problem in my CI environment but not when I am running the app locally. In both cases I use production build of JS bundle. It is obfuscated (thanks UglifyJS), so the message is a little bit different but after investigation it becomes obvious that I've run into the same issue.
It looks like this statement:
require('moment-range');
which comes after this one:
var _moment2 = _interopRequireDefault(_moment);
does not actually change the _moment2["default"] instance in some circumstances.
My CI environment is Codeship (Ubuntu) and this error is 100% reproduced there when I am running my integration tests. Both when app is deployed locally (OS X) and on production (a droplet on DigitalOcean with Ubuntu) there is no problem.
Apparently there is no dependency on Node or NPM. I tried different versions and got the same result.
I suspect that there is some difference in JS engines which are used in Chrome and Firefox on different operating systems. I get similar symptoms in both browsers. My conclusion is that Chrome/Firefox process JS code generated by Webpack differently under different operating systems. It explains all symptoms but does not unfortunately give a clue how to fix it. :-(
Any ideas someone? Except for switching to another plug-in?
from react-daterange-picker.
I have just tested it. Apparently it depends on the operating system but not the way I thought.
When bundle is generated under OS X it works even when the app is viewed in Chrome under Ubuntu (at least my integration test passed successfully). When bundle is generated under Ubuntu (in my setup) I get the error mentioned in the issue.
It looks like an issue in Webpack rather than in moment-range.
from react-daterange-picker.
Well, using a fresh install definitely helps. Dependency cache was my enemy, now the problem is gone completely.
from react-daterange-picker.
hm... have the same issue on ubuntu, on mac os it's ok.
from react-daterange-picker.
@yrik if you are still having issues, would you mind specifying what version of moment range you have in your mac and Ubuntu installs
from react-daterange-picker.
I just had this issue and it ended being resolved when I deleted node_modules, npm cache clear
and npm install
. Then there are no issues for some odd reason...
from react-daterange-picker.
I don't use react-daterange-picker but ran into this same issue (symptoms exactly as described by @szubtsovskiy). Reinstalling the dependencies (as described above) and rebundling helped.
from react-daterange-picker.
Still having this issue, none of the above fixes are working for me.
from react-daterange-picker.
This should be fixed now by the latest version, please open a new issue if this is still happening after upgrading 👍
from react-daterange-picker.
Related Issues (20)
- Select Y or M after init Picker HOT 1
- Displayed range presumes selecting dates from future rather than past
- Today cell highlight HOT 1
- Please update the following components: CalendarDate, CalendarMonth, DateRangePicker, PaginationArrow HOT 1
- Custom icon for Pagination HOT 1
- How to Close calendar on date selection?
- unavailable dates shows half days on the calendar
- How to select only single day ? HOT 1
- Update moment-range to latest version 4.0.2
- SelectionType='single' and DateRange value HOT 1
- How to clear a particular selected range?
- How to localize month labels
- dependency limited to react 16.x HOT 2
- on outside click of calendar POPUP should close
- hi.. I need to show half a day selection in my project - half a day morning/evening.
- hi.. I need to show half a day selection in my project - half a day morning/evening. On passing a date, its highlighting the date partially below. How to highlight the date partially above?
- half a day selection issue
- Closing modal to reset date selection
- [Mobile view] Scrolling date picker using touch behavior also selects date
- OnSelect didn't work with onSelectStart
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-daterange-picker.