woocommerce/plugins/woocommerce-admin/client/components/date-picker
Justin Shreve bf80e5c649 Global Header & Activity Panel on all WooCommerce Pages (https://github.com/woocommerce/woocommerce-admin/pull/110)
* Makes the header/sidebar component embeddable on other WooCommerce pages.

* Some mobile CSS fixes to make sure the header bar displays properly on smaller screensizes.

* Refactor notices and pull out success message from the panel

* Handle positioning of screen options, update message handling, css fixes and header height increase to match mockups, some code cleanup

* Only enable the header embed on normal/classic WooCommerce pages, and provide a method for plugins to opt-in.
This change also builds nicer breadcrumbs for pages.

* Code cleanup and consistent naming.

* Some spacing cleanup. Also updated the page title method to correctly set page titles in PHP for classic WC pages
2018-06-26 10:49:42 -04:00
..
README.md DatePicker: Add url support and container 2018-06-05 10:20:25 +12:00
compare-periods.js DatePicker: Add url support and container 2018-06-05 10:20:25 +12:00
content.js Global Header & Activity Panel on all WooCommerce Pages (https://github.com/woocommerce/woocommerce-admin/pull/110) 2018-06-26 10:49:42 -04:00
index.js DatePicker: Add url support and container 2018-06-05 10:20:25 +12:00
preset-periods.js DatePicker: Add url support and container 2018-06-05 10:20:25 +12:00
style.scss DatePicker: Add url support and container 2018-06-05 10:20:25 +12:00

README.md

Date Picker (Work in Progress)

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