I am using react-nice-calender in my application. The problem is that the year is missing from the calendar as you see in the image. How can I fix that!
The code :
const [date, setDate] = useState();
<DatePickerCalendar
date={date}
onDateChange={setDate}
locale={enGB}
/>
If you want to show the year you have to format the date with date-fns dependencie so I take the example from: https://reactnicedates.hernansartorio.com/
Here you have a codesandbox: https://codesandbox.io/s/datepicker-default-example-0kn7i
If you are in the current year it wont appear:
2021(current year):
2023: