Hacker0x01 / react-datepicker

A simple and reusable datepicker component for React
https://reactdatepicker.com/
MIT License
7.96k stars 2.23k forks source link

Is there any way to enter date as 12022021(MMDDYYYY) and still select date, if not, can that be added ? #3549

Open ATZTests opened 2 years ago

ATZTests commented 2 years ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like My requirement is even though i enter the date with out any separators, it should select the date. For example, for December 10th 2021 all the below inputs should select that date 12/10/2021 - already working 12-10-2021 - already working 12102021 - Not working

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

stale[bot] commented 1 year ago

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.

DaveSauce commented 1 year ago

@ATZTests the way to handle this is to mask the input with a customInput. I found comigo-tech-react-input-mask to be the best solution for my use case:

import InputMask from "comigo-tech-react-input-mask";

<DatePicker
  customInput={<InputMask mask={inputMask} />}
  ...
/>
github-actions[bot] commented 2 months ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 10 days.