Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RangeError: invalid date #19

Open
Aniruddh1707 opened this issue Oct 26, 2023 · 0 comments
Open

RangeError: invalid date #19

Aniruddh1707 opened this issue Oct 26, 2023 · 0 comments

Comments

@Aniruddh1707
Copy link

Aniruddh1707 commented Oct 26, 2023

I am using react-light-calendar in my react app and it was working fine earlier but now it's not working and it gives "RangeError: invalid date" error when i try to open calendar.
I have also update the version of react and react-dom to "react": "^16.3.0", "react-dom": "^16.3.0" according to instruction.
I am using "@lls/react-light-calendar": "^2.2.0" this version in my react app.
But it gives "RangeError: invalid date" everytime.

constructor(props) {
super(props);
const date = new Date();
const startDate = date.getTime();
const endDate = date.getTime();
this.state = {
startDate,
endDate
}
}

<ReactLightCalendar startDate={this.state.startDate} endDate={this.state.endDate} onChange={this.onChange} range displayTime = {false}
disableDates={date => date >= new Date().getTime()}/>

Can you please provide the solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant