@paprika/date-range-picker
v4.0.1
Published
DateRangePicker component allows user to view and specify a date range through an entry fields or a calendar widgets.
Downloads
193
Keywords
Readme
@paprika/date-range-picker
Description
DateRangePicker component allows user to view and specify a date range through an entry fields or a calendar widgets.
Installation
yarn add @paprika/date-range-picker
or with npm:
npm install @paprika/date-range-picker
Props
DateRangePicker
| Prop | Type | required | default | Description | | --------- | ---------- | -------- | ------- | --------------------------------------------------- | | startDate | instanceOf | false | null | Selected start date in moment object | | endDate | instanceOf | false | null | Selected end date in moment object | | onChange | func | true | - | Callback to fire when user select start or end date | | children | node | false | null | |
Subcomponents
DateRangePicker.Input
Can receive any props suitable for DateInput
component. Props will be applied to both inputs (start date and end date input).
DateRangePicker.StartInput
Can receive any props suitable for DateInput
component. This component has priority over DateRangePicker.Input
.
DateRangePicker.EndInput
Can receive any props suitable for DateInput
component. This component has priority over DateRangePicker.Input
.
DateRangePicker.Popover
Can receive any props suitable for Popover
component.