Closed SpaceK33z closed 7 years ago
Relevant issue in react-dates: https://github.com/airbnb/react-dates/issues/237
With react-day-picker this seems to be a lot easier. <DayPickerInput />
accepts a component
prop, which we can use to pass a custom input component - with a text mask applied.
react-day-picker also has the advantage of being a lot lighter than react-dates.
Refactored to react-day-picker (wow this was easy). Next step is actually fixing this issue.
@SpaceK33z, the issue I had with react-day-picker, and react-dates is that when I change the month on the input, the month is not visible on the calendar but i actually have to navigate to it.
did you face the same issue ?
@amine-benselim yes I did face the same issue, I fixed it with this commit: https://github.com/CodeYellowBV/re-cy-cle/commit/843b49cca5e38bafd8d77dd171e19454aa0e2b2f#diff-56694972cccd2c99fe20018197905792
thanks @SpaceK33z. the issue I am facing is that I am not using the 'react-day-picker` input field but my custom one.
Currently it is possible to freely type in the input field instead of using the picker to select a date, but it is not clear at all how the date should be formatted. If we use some sort of text mask we can make this clear to the user.
Perhaps react-dates already has something for this.
cc @RogerKemp