Skip to content

Commit

Permalink
📚 [document] update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lanjingling0510 committed May 12, 2018
1 parent f50a83d commit f4f3f01
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Binary file added .github/year-custom_month-day.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,34 @@ set dateFormat for `['hh', 'mm', 'ss']` to configure hour, minute and second.
<img src="https://raw.githubusercontent.com/lanjingling0510/react-mobile-datepicker/master/.github/hour-minute-second.png" width="300" />
</div>

customize the content mapping shown in the month.

```js
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']}
/>

```

<img src="https://raw.githubusercontent.com/lanjingling0510/react-mobile-datepicker/master/.github/year-custom_month-day" width="300" />
</div>



## Getting Started

Expand Down

0 comments on commit f4f3f01

Please sign in to comment.