Date-FNS, format date #197768
Unanswered
Fred638
asked this question in
Programming Help
Date-FNS, format date
#197768
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Question
Body
I am using Date-FNS and need to format the input field, type="date" defaultValue={formattedDate} to dd-MMM-yyyy. Desired input: i.e. 02-JUL-2026. I am getting: 2026-07-02.
const currentDate = new Date() const formattedDate = format(currentDate, 'dd-MMM-yyyy')Guidelines
Beta Was this translation helpful? Give feedback.
All reactions