woocommerce/plugins/woocommerce-admin/client/components/calendar
Paul Sealock 817f6813a1 Date: Load localeData into Momentjs 2018-07-06 14:04:17 +12:00
..
README.md DatePicker: Hook up react-dates 2018-06-27 14:11:13 +12:00
index.js Date: Load localeData into Momentjs 2018-07-06 14:04:17 +12:00
phrases.js DatePicker: Hook up react-dates 2018-06-27 14:11:13 +12:00
style.scss DatePicker: Hook up react-dates 2018-06-27 14:11:13 +12:00

README.md

Calendar

This is wrapper for a react-dates powered calendar.

How to use:

import { DateRange } from 'components/calendar';

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