Allow use of other date and hour format e.g (dd/MM/yyyy : HH:mm) through locale 'pt-br'. This problem affect inputs on our application.
The format(date/hour) continue uses the default format. And shows the warn on console:
A locale object was not found for the provided string ["pt-br"].
The code is some like this:
import DatePicker from 'react-datepicker'
import 'react-datepicker/dist/react-datepicker.css'
import 'moment/locale/pt-br'
<DatePicker
{ ...props }
locale='pt-br'
/>
I have try fix it with different forms in last days, but the behaviour does not change.
Try adding the dateFormat="PP" or any of the various P format string options from https://date-fns.org/v2.0.0-beta.2/docs/format:
<DatePicker
{ ...props }
locale='pt-br'
dateFormat="PP"
/>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.