So far I am not able to figure out how to display short month names? Like December -> Dec

This is my code exaple
formatMonth = () => {
return (locale, date) => { month: 'short' }
}
render() {
return (
<CalendarInput
value=''
returnValue="range"
calendarType="US"
className={classes.calendar}
onChange={() => {
// Need to implement
}}
formatMonth={this.formatMonth}
/>
);
}
What am I missing?
That function is formatting month and year, so you're looking for formatMonthYear.
Okay. Thank you. Can you tell me how to implement that with the same code above? @wojtekmaj
Probably something like
formatMonthYear={(locale, date) => date.toLocaleString(locale, { month: 'short', year: 'numeric' )}
would suffice.