# Datepicker

### Usage

```js
import { Datepicker } from 'phoenix-components-library';

render() {
  return (
    <Datepicker
        format={text('Format', 'YYYY-MM-DD H:m:s')}
        placeholder={text('Placeholder', 'Placeholder')}
        onDatepickerOkClick={action('onClick')}
        defaultValue={new Date()}
    />
  );
}
```

### Live Example

<!-- STORY -->

### Properties

- `format` - to set the date format, refer to **moment.js**
- `placeholder` - placeholder of date input
- `defaultValue` - to set default date
- `showTime` - to provide an additional time selection
- `onDatepickerOkClick` - callback when click ok button
- `onDatepickerChange` - a callback function, can be executed when the selected time is changing

| propName      | propType | defaultValue | isRequired |
| ------------- | -------- | ------------ | ---------- |
| name          | string   | -            |            |
| type          | string   | text         |            |
| value         | string   | -            |            |
| placeholder   | string   | false        |            |
| class         | string   | -            |            |
| color         | string   | -            |            |
| onChangeInput | func     | -            |            |
| onFocusInput  | func     | -            |            |

### Roadmap
