woocommerce/plugins/woocommerce-admin/client/components/calendar
Albert Juhé Lluveras 70bb1d28c8 IE11: fix dates overlapping in Custom filter (https://github.com/woocommerce/woocommerce-admin/pull/411) 2018-09-14 17:35:04 +02:00
..
README.md Docs Project: Component cleanup (https://github.com/woocommerce/woocommerce-admin/pull/334) 2018-08-31 13:19:13 -04:00
index.js Add required polyfills so react-dates works in Internet Explorer 11 (https://github.com/woocommerce/woocommerce-admin/pull/356) 2018-09-11 09:28:50 +02:00
input.js Datepicker: Custom: Add styles 2018-07-30 10:36:38 +12:00
phrases.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 IE11: fix dates overlapping in Custom filter (https://github.com/woocommerce/woocommerce-admin/pull/411) 2018-09-14 17:35:04 +02:00

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 selection
  • end: A moment date object representing the selected end. null for no selection
  • onSelect: A function called upon selection of a date
  • invalidDays: Optionally invalidate certain days. past, future, none, or function are accepted. A function will be passed to react-dates' isOutsideRange prop