Open eschumacher-99 opened 2 years ago
Are you sure, it seems right to me: https://github.com/hypeserver/react-date-range/blob/master/src/components/Calendar/index.js#L35-L37
Are you sure, it seems right to me: https://github.com/hypeserver/react-date-range/blob/master/src/components/Calendar/index.js#L35-L37
Yes, I think it's a problem with @types/react-date-range missing the locale in the Calendar Props interface as I am using typescript:
`export interface CommonCalendarProps {
/ default: DD/MM/YYY */
format?: string;
firstDayOfWeek?: number;
theme?: CalendarTheme;
/* default: none /
onInit?: (range: Range) => void;
/ default: none */
onChange?: (range: Range) => void;
/ default: none */
minDate?: DateInputType;
/* default: none /
maxDate?: DateInputType;
/
I've opened a pull request on DefinitelyTyped that should fix this issue.
DefinitelyTyped is unfortunately very outdated. I have started a Pr to hopefully add full TS support: https://github.com/hypeserver/react-date-range/pull/499 If you have time would appreciate if you could take a look and even better try it?
Subject of the issue
The locale prop doesn't exist on the Calendar using typescript. There's only the lang-prop with about 5 different languages but the documentation says otherwise.
[BUG] Bug Reproduce Steps
[BUG] Expected behaviour
Calendar should use locale-prop like DateRangePicker instead of lang-prop when using typescript.
Environment
Using Typescript Package Version: 1.3.0 Types Version: 1.1.5