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

262
Views
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 answers
Answer question

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 Report
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!