Skip to content

Commit f4f3f01

Browse files
📚 [document] update readme.md
1 parent f50a83d commit f4f3f01

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.github/year-custom_month-day.png

20.9 KB
Loading

README.md

+28
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,34 @@ set dateFormat for `['hh', 'mm', 'ss']` to configure hour, minute and second.
5252
<img src="https://raw.githubusercontent.com/lanjingling0510/react-mobile-datepicker/master/.github/hour-minute-second.png" width="300" />
5353
</div>
5454

55+
customize the content mapping shown in the month.
56+
57+
```js
58+
const monthMap = {
59+
'01': 'Jan',
60+
'02': 'Feb',
61+
'03': 'Mar',
62+
'04': 'Apr',
63+
'05': 'May',
64+
'06': 'Jun',
65+
'07': 'Jul',
66+
'08': 'Aug',
67+
'09': 'Sep',
68+
'10': 'Oct',
69+
'11': 'Nov',
70+
'12': 'Dec',
71+
};
72+
73+
<DatePicker
74+
dateFormat={['YYYY', ['MM', (month) => monthMap[month]], 'DD']}
75+
/>
76+
77+
```
78+
79+
<img src="https://raw.githubusercontent.com/lanjingling0510/react-mobile-datepicker/master/.github/year-custom_month-day" width="300" />
80+
</div>
81+
82+
5583

5684
## Getting Started
5785

0 commit comments

Comments
 (0)