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

161
Views
how to fix redux time issue with react date picker

i am using the react datepicker module and in that i am using it only for month and year picker. when i get the date in my onChange in react date picker. i get 'Mon Nov 01 2021 00:00:00 GMT+0400 (Gulf Standard Time)' and in my redux store i get 2021-10-31T20:00:00.000Z. there is a four hours lap due to which i get the error date.format is not a function and in some cases i get invalid time format error as well. so please if anybody knows let me know. my code for date picker is below

<DatePicker
  selected={passenger?.passportExp}
  onChange={(date) => {
    modifyPassenger(index, { passportExp: date });
  }}
  maxDate={newDate(new Date().getFullYear(), new Date().getMonth() + 1, 0)}
  showMonthYearPicker
  dateFormat="MMM yyyy"
  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!