react-daterange-picker icon indicating copy to clipboard operation
react-daterange-picker copied to clipboard

Add TypeScript support

Open hckhanh opened this issue 3 years ago • 8 comments

I wonder why react-date-picker and react-datetimerange-picker have their own ts supports, but not this one.

hckhanh avatar Jun 30 '21 07:06 hckhanh

Is there any news about typescript support, thanks

GreenRidingHood avatar Sep 03 '21 01:09 GreenRidingHood

Type definitions are to be added to DefinitelyTyped project. PRs with type definitions added directly to here won't be accepted.

wojtekmaj avatar Sep 03 '21 07:09 wojtekmaj

@hckhanh i solved issue with create decs.d.ts file in project and src file , i am not sure which one i need but i created both places

content of my src/decs.d.s file is

declare module "@wojtekmaj/react-daterange-picker"; declare module "react-calendar"; declare module "react-moment"; declare module "react-dates/initialize";

proj file decs.d.ts content

/* eslint-disable */ declare module "@wojtekmaj/react-daterange-picker"; declare module "react-daterange-picker";

and my state hook

const [visitData, setVisitData] = useState({ dateRange: [new Date(), new Date()], resource: "", });

hope works for you as well, best

GreenRidingHood avatar Sep 05 '21 00:09 GreenRidingHood

@GreenRidingHood perhaps we should have a PR for this :D

hckhanh avatar Sep 13 '21 02:09 hckhanh

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.

github-actions[bot] avatar Feb 28 '22 00:02 github-actions[bot]

This issue was closed because it has been stalled for 14 days with no activity.

github-actions[bot] avatar Mar 14 '22 00:03 github-actions[bot]

Comment helped me But need normally support TS Please

1xtr avatar Jul 15 '22 09:07 1xtr

They have typescript support here https://www.npmjs.com/package/@types/wojtekmaj__react-daterange-picker

npm i -D @types/wojtekmaj__react-daterange-picker

rohmanhm avatar Sep 27 '22 05:09 rohmanhm

Implemented in #271.

wojtekmaj avatar May 18 '23 14:05 wojtekmaj