Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

589
Views
how to fix uncaught rangeerror: invalid time value in react date picker

i have done everything possible from my end to fix this issue but i am failing again and again. when i put something in the input form, the value is stored in redux and when i refresh the page i get the following error :

uncaught rangeerror: invalid time value

my code for datepicker is as follow:

 <DatePicker
 selected={passenger?.passportExp}
 onChange={date => {
 console.log("SELECTED DATEEEE >>>>>>",moment(date).add(12,'hours').toDate())
 modifyPassenger(index, { passportExp: moment(date).add(12,'hours').toDate() })
 }}
 maxDate={new Date(new Date().getFullYear() + 30,new Date().getMonth()+1, 0)}
 showMonthYearPicker
 dateFormat="MMM y"
 onFocusChange={({ focused }) => this.setState({ passportExp: focused })}
/>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!