react-nice-dates icon indicating copy to clipboard operation
react-nice-dates copied to clipboard

DateRangePickerCalendar doesn't work.

Open danielweil opened this issue 3 years ago • 2 comments

Hey, thanks for the awesome and lightweight package!

I have been trying to use DateRangePickerCalendar with my popover component as I did with DatePickerCalendar component, but both onStartDateChange and onEndDateChange don't trigger any actions. Typescript is giving me errors, but I think it's only about types, but it didn't work. I tried using the exact example in the docs to see if I was doing something wrong but it still didn't work.

Thanks for the help!

danielweil avatar Sep 02 '21 21:09 danielweil

Just figured out that the problema is START_DATE constant is not being defined and is not able to be found by Typescript. Declaring in my component makes it work.

danielweil avatar Sep 02 '21 21:09 danielweil

Perhaps add the following to react-nice-dates/index.d.ts?

declare const START_DATE: string;
declare const END_DATE: string;

lightwave avatar Nov 19 '21 22:11 lightwave