woocommerce/plugins/woocommerce-admin/client/components/date-picker
Paul Sealock 31c055fd57 Component: Filter Picker 2018-07-17 12:25:00 +12:00
..
README.md Component: Filter Picker 2018-07-17 12:25:00 +12:00
compare-periods.js Update woo-dash naming to new wc-admin name (https://github.com/woocommerce/woocommerce-admin/pull/183) 2018-07-10 08:48:06 -04:00
content.js Update woo-dash naming to new wc-admin name (https://github.com/woocommerce/woocommerce-admin/pull/183) 2018-07-10 08:48:06 -04:00
index.js Component: Filter Picker 2018-07-17 12:25:00 +12:00
preset-periods.js Update woo-dash naming to new wc-admin name (https://github.com/woocommerce/woocommerce-admin/pull/183) 2018-07-10 08:48:06 -04:00
style.scss Datepicker: Add styles 2018-07-03 11:41:38 +12:00

README.md

Date Picker

Select a range of dates or single dates

Usage

<DatePicker query={ query } path={ path } />

Props

Required props are marked with *.

Name Type Default Description
query* object none The query string represented in object form
path* string none path parameter supplied by React-Router

URL as the source of truth

The Date Picker reads parameters from the URL querystring and updates them by creating a link to reflect newly selected parameters, which is rendered as the "Update" button.

URL Parameter Default Possible Values
period today today, yesterday, week, last_week, month, last_month, quarter, last_quarter, year, last_year, custom
compare previous_period previous_period, previous_year
start none start date for custom periods 2018-04-15. ISO 8601 format
end none end date for custom periods 2018-04-15. ISO 8601 format