How to use the react-day-picker.DateUtils.isPastDay function in react-day-picker

To help you get started, we’ve selected a few react-day-picker examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github freeCodeCamp / meeting-for-good / client / pages / NewEvent / index.js View on Github external
const { from, to } = ranges[0];
    const selectedDays = day => DateUtils.isDayInRange(day, this.state) ||
    ranges.some(v => DateUtils.isDayInRange(day, v));

    return (
      <div>
        <h6>What dates might work for you?</h6>
        <div>
          {from &amp;&amp; to &amp;&amp;
            
          }
        </div>
         550 ? 2 : 1}
          fromMonth={new Date()}
          disabledDays={DateUtils.isPastDay}
          onDayClick={this.handleDayClick}
          classNames={styles}
          selectedDays={selectedDays}
        /&gt;
      </div>
    );
  }
github appnexus / lucid / src / components / CalendarMonth / examples / 4.select-dates.jsx View on Github external
render() {
		const { selectedDays, cursor, offset } = this.state;

		return (
			<section>
				<div style="{{">
					<button>{'&lt;'}</button>

					

					<button>{'&gt;'}</button>
				</div>
				selectedDays:{' '}
				{_.map(selectedDays, selected =&gt;
					selected.toLocaleDateString('en-US')
				).join(', ')}
			</section>
		);
	},
});
github appnexus / lucid / src / components / CalendarMonth / examples / 5.select-range.jsx View on Github external
return (
			<section>
				<div style="{{">
					<button>{'&lt;'}</button>

					

					

					<button>{'&gt;'}</button>
				</div></section>