npm package: @paprika/date-input
Description: The DateInput component allows users to enter and display a date.
Author: @paprika
Latest version: 4.0.4

<!-- start: Autogenerated - do not modify -->

# @paprika/date-input

## Description

The DateInput component allows users to enter and display a date.

## Installation

```
yarn add @paprika/date-input
```

or with npm:

```
npm install @paprika/date-input
```

## Props

### DateInput

| Prop                 | Type       | required | default      | Description                                                                                                  |
| -------------------- | ---------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------ |
| hasError             | bool       | false    | false        | If the value of `<input>` is valid or not.                                                                   |
| dateFormat           | string     | false    | "MM/DD/YYYY" | Date format used while entering and parsing user input.                                                      |
| date                 | instanceOf | false    | null         | Selected date in moment object.                                                                              |
| humanFormat          | string     | false    | undefined    | Date format used while displaying date. It should be human-friendly and spelled out, default is MMMM DD,YYYY |
| onChange             | func       | false    | () => {}     | Callback when date is inputed. Will be called on blur or enter key press.                                    |
| onChangePossibleDate | func       | false    | () => {}     | Callback when user inputs date. Will be called after every key up event.                                     |
| onError              | func       | false    | () => {}     | Error callback. Will be called on blur or enter key press if inputted date can't be parsed.                  |
| onClick              | func       | false    | () => {}     | Callback to be executed when the dateInput is clicked or activated by keyboard.                              |
| denyConfirmation     | func       | false    | () => false  | Guard function. If it returns true - confirmation will be prevented.                                         |
| beforeConfirmation   | func       | false    | () => {}     | Callback when confirm                                                                                        |

<!-- end: Autogenerated - do not modify -->
<!-- content -->

## Usage

```js
import DateInput from "@paprika/date-input";

<DateInput dateFormat="MM/DD/YYYY" />;
```

Note: Please use `<L10n />` component to wrap `<DateInput />` in your application.

<!-- eoContent -->

## Links

- [Storybook Showcase](https://paprika.highbond.com/?path=/story/forms-dateinput--showcase)
- [GitHub source code](https://github.com/acl-services/paprika/tree/master/packages/DateInput/src)
- [Create GitHub issue](https://github.com/acl-services/paprika/issues/new?label=[]&title=@paprika/date-input%20[help]:%20your%20short%20description&body=%0A%23%20Help%20wanted%0A%0A%23%23%20Please%20write%20your%20question.%0A*A%20clear%20and%20concise%20description%20of%20what%20the%20question%20is*%0A%0A%23%23%20Additional%20context%0A*Add%20any%20other%20context%20or%20screenshots%20about%20your%20question%20here.*%0A)
- [CHANGELOG](https://github.com/acl-services/paprika/tree/master/packages/DateInput/CHANGELOG.md)