DocSpace-buildtools/web/ASC.Web.Storybook/stories/input/date/README.md

30 lines
1.3 KiB
Markdown
Raw Normal View History

2019-06-27 14:36:42 +00:00
# DateInput
#### Description
Custom date input
#### Usage
```js
import { DateInput } from 'asc-web-components';
2019-06-28 12:40:40 +00:00
<DateInput selected={new Date()} dateFormat="dd.MM.yyyy" onChange={date => {}}/>
2019-06-27 14:36:42 +00:00
```
#### Properties
2019-07-01 09:34:22 +00:00
https://reactdatepicker.com/
| Props | Type | Required | Values | Default | Description |
| ------------ | -------- | :------: | ------ | ------- | --------------------------------------- |
| `id` | `string` | - | - | - | Used as HTML `id` property |
| `name` | `string` | - | - | - | Used as HTML `name` property |
| `disabled` | `bool` | - | - | - | Used as HTML `disabled` property |
| `readOnly` | `bool` | - | - | - | Used as HTML `readOnly` property |
| `selected` | `date` | - | - | - | Selected date value |
| `onChange` | `func` | - | - | - | OnChange event |
| `dateFormat` | `string` | - | - | - | Date format string |
| `hasError` | `bool` | - | - | - | Indicates the input field has an error |
| `hasWarning` | `bool` | - | - | - | Indicates the input field has a warning |