question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Old version of React-Date-Picker allows too new version of React-Calendar

See original GitHub issue

I installed using: npm i react-date-picker@6.7.0

With react 15.5.4

When I try to do the simple example:

state = {
    date: new Date(),
  }

  onChange = date => this.setState({ date })

  render() {
    return (
        <DatePicker
          onChange={this.onChange}
          value={this.state.date}
        />
   }

I get this error in the console:

image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
wojtekmajcommented, Mar 9, 2018

Hey there, it seems like the version of react-calendar got installed. Which is odd, because it means package-lock.json did not work properly 😦 Please try the following:

npm uninstall react-date-picker
npm install react-calendar@2.11.0
npm install react-date-picker@6.7.0

I think this will ensure the correct version of dependencies is installed.

2reactions
LuisEgancommented, May 24, 2018

@buddythumbs are you sure everything installed correctly, both of the packages appear in your package.json?? Perhaps you could try deleting your package-lock.json and your node_modules folder and then running npm install

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-datepicker - npm
A simple and reusable datepicker component for React. Latest version: 4.8.0, last published: 7 months ago. Start using react-datepicker in ...
Read more >
React date pickers use older react versions - Stack Overflow
I am creating application which use a calendar and tried several react-date time pickers such as react-jqueryui-datepicker ...
Read more >
Getting started with react-datepicker - Retool
Learn how to use react-datepicker in your React app to build a simple datepicker and customize it with time functionality, disabling dates, ...
Read more >
React custom datepicker: Step-by-step - LogRocket Blog
datepicker : Renders a date input and presents the calendar for the user to select the date. We'll store each component in its...
Read more >
Datepicker documentation for React | Mobiscroll
Name Type Default value anchor HTMLElement undefined animation String, Boolean undefined buttons Array
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found