how to add separator automatically in DayPickerInp

2019-08-30 01:03发布

问题:

how can i add the / - separator in DayPickerInput during the user digit?

for example in it locale: 23091989 digit should be equal to 23/09/1989

回答1:

You can pass any formatter / parser to the formatDate or parseDate props:

http://react-day-picker.js.org/api/DayPickerInput#formatDate