Rich
Rich

Reputation: 185

Get only date and give only date as input to react-date-picker

I am using reat-date-picker package and I am in a situation where I want to give input only in date format like 09/23/2020 to reat-date-picker and save the selected value in the same format i.e. 03/22/2020. But if we give only date as input to reat-date-picker it is giving below error. Someone help me out. Please refer to the sandbox link.

Failed to get month from date:

Reference: https://codesandbox.io/s/react-datepicker-forked-rz7c0?file=/src/index.js

Thank you.

Upvotes: 2

Views: 5222

Answers (1)

Rich
Rich

Reputation: 185

Issue solved.

Reference: https://codesandbox.io/s/react-datepicker-forked-rz7c0?file=/src/index.js

Thank you.

Upvotes: 2

Related Questions