react-nice-dates
react-nice-dates copied to clipboard
DateRangePickerCalendar doesn't work.
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!
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.
Perhaps add the following to react-nice-dates/index.d.ts
?
declare const START_DATE: string;
declare const END_DATE: string;