react-datepicker icon indicating copy to clipboard operation
react-datepicker copied to clipboard

Examples not working

Open overtureweb opened this issue 7 years ago • 2 comments

Expected behavior

In the example for Exclude Dates, the excludeDates attribute is written as excludeDates={[new Date(), subDays(new Date(), 1)] When I include this line in my code it should exclude the current date and the previous date.

Actual behavior

When I attempt to use this in my component I receive an error that subDays is not defined

overtureweb avatar May 03 '19 02:05 overtureweb

subDays is defined in date-fns library and you can find it in ./es/index.js. You have to import it like this import subDays from "date-fns/subDays"; into your code but you have to have "npm install date-fns"

MoAli2016 avatar May 06 '19 11:05 MoAli2016

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.

stale[bot] avatar Nov 02 '19 11:11 stale[bot]