Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

162
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda