Closed magom001 closed 6 years ago
@magom001 I have added this feature in react-mobile-datepicker@3.0.11
It's used like this:
const monthMap = {
'01': 'Jan',
'02': 'Feb',
'03': 'Mar',
'04': 'Apr',
'05': 'May',
'06': 'Jun',
'07': 'Jul',
'08': 'Aug',
'09': 'Sep',
'10': 'Oct',
'11': 'Nov',
'12': 'Dec',
};
<DatePicker
dateFormat={['YYYY', ['MM', (month) => monthMap[month]], 'DD']}
/>
Need to add an option to convert month number to month name.
E.g.:
const monthMap = { 0: 'Jan', 1: 'Feb', 2: 'March', }
<DatePicker dateFormat={['YYYY', ['MM', (month) => monthMap(month)], 'DD']} />