Show only first 3 letters of a month, how to do it? #1783
Answered
by
gpbl
GenatHadri
asked this question in
Support
-
Hello everyone, |
Beta Was this translation helpful? Give feedback.
Answered by
gpbl
May 3, 2023
Replies: 1 comment
-
Hi @GenatHadri! Where do you want to show the first 3 letters? If it is in the caption, you can pass a <DayPicker
formatters={{
formatCaption: (date) => format(date, "MMM yyyy").toUpperCase()
}}
/> Example: https://codesandbox.io/s/react-daypicker-forked-djmu70?file=/src/App.tsx |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
gpbl
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @GenatHadri! Where do you want to show the first 3 letters? If it is in the caption, you can pass a
formatCaption
function to the formatters prop:Example: https://codesandbox.io/s/react-daypicker-forked-djmu70?file=/src/App.tsx