# react-onchange-date-formatter

> A date formatter package for react

Latest version **1.0.11** (published 2023-06-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-onchange-date-formatter
pnpm add react-onchange-date-formatter
yarn add react-onchange-date-formatter
bun add react-onchange-date-formatter
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2023-06-10 |
| First published | 2023-06-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | hasanul banna |
| Maintainers | hasanulbannacp |
| Keywords | date, formatter, react-date-formatter, react-onchange-date-formatter, date-input |

## Links

- npm: https://www.npmjs.com/package/react-onchange-date-formatter
- Repository: https://github.com/Cphasanulbanna/react-date-formator
- Homepage: https://github.com/Cphasanulbanna/react-date-formator#readme
- Issues: https://github.com/Cphasanulbanna/react-date-formator/issues
- npm.io page: https://npm.io/package/react-onchange-date-formatter

## Dependencies (1)

- [react](https://npm.io/package/react.md) ^18.2.0

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 1.0.11 (latest) — 2023-06-10
- 1.0.10 — 2023-06-10
- 1.0.9 — 2023-06-10
- 1.0.8 — 2023-06-10
- 1.0.7 — 2023-06-10
- 1.0.6 — 2023-06-10
- 1.0.5 — 2023-06-09
- 1.0.4 — 2023-06-09
- 1.0.3 — 2023-06-09
- 1.0.2 — 2023-06-09
- 1.0.1 — 2023-06-09
- 1.0.0 — 2023-06-08

## README

��# react-onchange-date-formatter

A simple date formatter for react apps

# installation

```
npm i react-onchange-date-formatter
```

# props

-   e: Event on onChange.
-   setState: State updater.
-   specialCharacter: Any special character that you want to format the date.

# Usage Example

```jsx
import React, { useState } from "react";
import useFormatDate from "react-onchange-date-formatter";

export default function App() {
    const [date, setDate] = useState("");

    const formatDate = useFormatDate();

    // This can be "-", "/", " ", ".", "|" etc
    const specialCharacter = "/";

    const handleDateChange = (e) => {
        formatDate(e, setDate, specialCharacter);
    };

    return (
        <div>
            <input
                type="text"
                placeholder="10/10/2023"
                value={date}
                onChange={handleDateChange}
            />
        </div>
    );
}
```

# npm link

https://www.npmjs.com/package/react-onchange-date-formatter

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