d36511479e
* Switch all components to default exports This ensures we can read all components for documentation generation (plus, standardizing is good) * Add documentation to component file * Fix table exports * Move readme docs into inline docs Includes updating new props, adding prop shapes * Add doc-generation scripts to pull exported component docs into folder * Remove key propType, causing react special-keys warning * Fix proptype * Update incorrect comment * Remove template import, we can just use string concat * Fix typo, update docs |
||
---|---|---|
.. | ||
README.md | ||
index.js | ||
input.js | ||
phrases.js | ||
style.scss |
README.md
Calendar
This is wrapper for a react-dates powered calendar.
How to use:
import { DateRange } from '@woocommerce/components';
render: function() {
return (
<DateRangePicker
start={ moment( 2018-01-01 ) }
end={ moment( 2020-01-01 ) }
onSelect={ this.onSelect }
invalidDays="past"
/>
);
}
Props
start
: A moment date object representing the selected start.null
for no selectionend
: A moment date object representing the selected end.null
for no selectiononSelect
: A function called upon selection of a dateinvalidDays
: Optionally invalidate certain days.past
,future
,none
, or function are accepted. A function will be passed to react-dates'isOutsideRange
prop