# @axa-fr/react-toolkit-form-input-date-phone

> ---

Latest version **1.4.1** (published 2021-10-27) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @axa-fr/react-toolkit-form-input-date-phone
pnpm add @axa-fr/react-toolkit-form-input-date-phone
yarn add @axa-fr/react-toolkit-form-input-date-phone
bun add @axa-fr/react-toolkit-form-input-date-phone
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.4.1 |
| Published | 2021-10-27 |
| First published | 2020-04-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 53.8 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 98 |
| Maintainers | guillaume.chervet.axa, samuel-gomez, youf-olivier, barry-thierno, antoine.blancke, arnaudforaison |

## Links

- npm: https://www.npmjs.com/package/@axa-fr/react-toolkit-form-input-date-phone
- Repository: https://github.com/AxaGuilDEv/react-toolkit
- Homepage: https://github.com/AxaGuilDEv/react-toolkit#readme
- Issues: https://github.com/AxaGuilDEv/react-toolkit/issues
- npm.io page: https://npm.io/package/@axa-fr/react-toolkit-form-input-date-phone

## Dependencies (5)

- [moment](https://npm.io/package/moment.md) 2.29.1
- [prop-types](https://npm.io/package/prop-types.md) 15.7.2
- [react-datepicker](https://npm.io/package/react-datepicker.md) 1.8.0
- [@axa-fr/react-toolkit-core](https://npm.io/package/@axa-fr/react-toolkit-core.md) 1.4.1
- [@axa-fr/react-toolkit-form-core](https://npm.io/package/@axa-fr/react-toolkit-form-core.md) 1.4.1

## Recent versions

- 1.4.1 (latest) — 2021-10-27
- 2.0.0-alpha.8 (next) — 2022-06-30
- 2.0.0-alpha.5 — 2021-11-26
- 2.0.0-alpha.4 — 2021-11-25
- 2.0.0-alpha.3 — 2021-11-17
- 1.4.0 — 2021-03-02
- 2.0.0-alpha.1 — 2021-03-02
- 2.0.0-alpha.0 — 2021-03-02
- 1.4.0-alpha.1 — 2021-01-05
- 1.4.0-alpha.0 — 2020-10-28
- 1.3.23 — 2020-10-09
- 1.3.21 — 2020-09-18
- 1.3.16 — 2020-07-23
- 1.3.15 — 2020-07-22
- 1.3.14 — 2020-06-19
- … 8 more at https://npm.io/package/@axa-fr/react-toolkit-form-input-date-phone/versions

## README

## Form Input Date

---

### Get started

```sh
npm i @axa-fr/react-toolkit-form-input-date-phone
```

First to use, you have to import the component.

```js
import { DatePhone } from '@axa-fr/react-toolkit-form-input-date-phone';
import '@axa-fr/react-toolkit-form-input-date-phone/dist/phonedate.scss';
```

The component reuses the native date input :

```
npm install moment --save
```

Do not forget the right local when starting your application. By default, "create-react-app" excludes locals ​​for lightening the version of your final application. Adding it explicitly allows the local file to be present in the final application.

```js
require('moment/locale/fr.js');
// in your start application file "index.js"
```

The date is a special component. It actually has 2 important props:

- viewValue: The value of the text field which is a string
- value: The value of the date in momentjs format

This allows you to have control of what happens and to respond to all use cases. If you are an individual, you can use the "viewValue" or "value" property. In any case if "viewValue" is not a valid date in the current language, the value of "value" returned will always be "null".

For more information about style component, you can see the [Form Date Style on Toolkit-core ](http://toolkit-intranet-axa.azurewebsites.net/#/form)

---
_Source: https://npm.io/package/@axa-fr/react-toolkit-form-input-date-phone · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
