# @types/react-flatpickr

> TypeScript definitions for react-flatpickr

Latest version **3.8.11** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/react-flatpickr
pnpm add @types/react-flatpickr
yarn add @types/react-flatpickr
bun add @types/react-flatpickr
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.8.11 |
| Published | 2023-11-07 |
| First published | 2017-04-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51446 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/react-flatpickr
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-flatpickr
- npm.io page: https://npm.io/package/@types/react-flatpickr

## Dependencies (2)

- [flatpickr](https://npm.io/package/flatpickr.md) ^4.0.6
- [@types/react](https://npm.io/package/@types/react.md) *

## Recent versions

- 3.8.11 (latest) — 2023-11-07
- 3.8.8 (ts4.1) — 2022-10-25
- 3.8.7 (ts3.9) — 2022-06-06
- 3.8.5 (ts3.8) — 2021-12-24
- 3.8.4 (ts3.6) — 2021-07-08
- 3.8.3 (ts3.5) — 2021-03-08
- 3.8.1 (ts2.8) — 2020-02-26
- 3.2.5 (ts2.6) — 2018-03-28
- 3.2.3 (ts2.3) — 2017-12-03
- 3.2.0 (ts2.2) — 2017-04-20
- 3.8.10 — 2023-10-18
- 3.8.9 — 2023-09-27
- 3.8.6 — 2022-03-01
- 3.8.2 — 2021-03-07
- 3.8.0 — 2019-06-18
- … 8 more at https://npm.io/package/@types/react-flatpickr/versions

## README

# Installation
> `npm install --save @types/react-flatpickr`

# Summary
This package contains type definitions for react-flatpickr (https://github.com/coderhaoxin/react-flatpickr).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-flatpickr.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-flatpickr/index.d.ts)
````ts
import flatpickr from "flatpickr";
import { Component, ReactElement } from "react";

export type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;

export interface DateTimePickerProps
    extends Omit<React.ComponentPropsWithoutRef<"input">, "children" | "value" | "onChange">
{
    defaultValue?: string | undefined;
    options?: flatpickr.Options.Options | undefined;
    onChange?: flatpickr.Options.Hook | undefined;
    onOpen?: flatpickr.Options.Hook | undefined;
    onClose?: flatpickr.Options.Hook | undefined;
    onMonthChange?: flatpickr.Options.Hook | undefined;
    onYearChange?: flatpickr.Options.Hook | undefined;
    onReady?: flatpickr.Options.Hook | undefined;
    onValueUpdate?: flatpickr.Options.Hook | undefined;
    onDayCreate?: flatpickr.Options.Hook | undefined;
    value?: string | Date | number | ReadonlyArray<string | Date | number> | undefined;
    className?: string | undefined;
    children?: React.ReactNode | undefined;
    render?:
        | ((
            props: Omit<DateTimePickerProps, "options" | "render">,
            ref: (node: HTMLInputElement | null) => void,
        ) => ReactElement)
        | undefined;
}

export default class DatePicker extends Component<DateTimePickerProps> {
    flatpickr: flatpickr.Instance;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/react](https://npmjs.com/package/@types/react), [flatpickr](https://npmjs.com/package/flatpickr)

# Credits
These definitions were written by [snaveevans](https://github.com/snaveevans), [jleider](https://github.com/jleider), and [sysix](https://github.com/sysix).

---
_Source: https://npm.io/package/@types/react-flatpickr · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
