Skip to content

How to change render day contents? #1923

Closed Answered by Leonardoperrella
Leonardoperrella asked this question in Support
Discussion options

You must be logged in to vote
const zeroPad = (num: number, places: number) =>
    String(num).padStart(places, "0");

const formatDay: DateFormatter = (day) => zeroPad(day.getDate(), 2);


<Calendar
    selected={date}
    onSelect={setDate}
    mode="single"
    formatters={{ formatDay }}
  />

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Leonardoperrella
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant