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

84
Vistas
Poor performance with a few hundred blocked dates in react-dates

As the title says, the behavior of react-dates is very bad with a large number (~500) of blocked dates.

Code of whole application is here: https://github.com/milanpanin/react-dates/blob/master/src/App.js Also, app is live here: https://react-dates-test.netlify.app/ and here you can see how slow the application actually works 😕

// [disableNext3, disableBetween, disableNext6Between] - represent arrays with all together about 500 dates
  const isBlocked = (day) => ([disableNext3, disableBetween, disableNext6Between].flat()).some(date => day.isSame(date, 'day'));

  return ( 
    <div className="App">
        <DateRangePicker
          startDateId="startDate"
          endDateId="endDate"
          startDate={startDate}
          endDate={endDate}
          onDatesChange={({ startDate, endDate }) => { setStartDate( startDate ), setEndDate( endDate )}}
          focusedInput={focusedInput}
          onFocusChange={(focusedInput) => { setSocusedInput( focusedInput )}}
          isDayBlocked={isBlocked}
        />
        ...

I also tried to implement a spinner on each render, but without success. Is there any solution to my problem?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

In the meantime, I came up with a solution. https://github.com/airbnb/react-dates/issues/2171

about 4 years ago · Juan Pablo Isaza Denunciar
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