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

263
Vistas
React datepicker short month how to display three letters only

Hi do you know how can I display "Dec" instead of "December" here , for this library https://reactdatepicker.com/ enter image description here

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

0

Here you go, using the Custom header:

() => {
    const [startDate, setStartDate] = useState(new Date());
    return (
        <DatePicker
            renderCustomHeader={({
                monthDate,
                customHeaderCount,
                decreaseMonth,
                increaseMonth,
            }) => (
                <div>
                    <button
                        className={
                            "react-datepicker__navigation react-datepicker__navigation--previous"
                        }
                        style={customHeaderCount === 1 ? { visibility: "hidden" } : null}
                        onClick={decreaseMonth}
                    >
                        <span
                            className={
                                "react-datepicker__navigation-icon react-datepicker__navigation-icon--previous"
                            }
                        >
                            {"<"}
                        </span>
                    </button>
                    <span className="react-datepicker__current-month">
                        {monthDate.toLocaleString("en-US", {
                            month: "short",
                            year: "numeric",
                        })}
                    </span>
                    <button
                        className={
                            "react-datepicker__navigation react-datepicker__navigation--next"
                        }
                        style={customHeaderCount === 1 ? { visibility: "hidden" } : null}
                        onClick={increaseMonth}
                    >
                        <span
                            className={
                                "react-datepicker__navigation-icon react-datepicker__navigation-icon--next"
                            }
                        >
                            {">"}
                        </span>
                    </button>
                </div>
            )}
            selected={startDate}
            onChange={(date) => setStartDate(date)}
        />
    );
};
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