diff --git a/examples/src/examples/DisabledDays.js b/examples/src/examples/DisabledDays.js index 6039696ce6..b6d7c7db05 100644 --- a/examples/src/examples/DisabledDays.js +++ b/examples/src/examples/DisabledDays.js @@ -3,6 +3,14 @@ import DayPicker from '../../../src'; import '../../../src/style.css'; +function sundays(day) { + return day.getDay() === 0; +} + +function saturdays(day) { + return day.getDay() === 6; +} + export default class DisabledDays extends React.Component { state = { selectedDay: null, @@ -16,18 +24,17 @@ export default class DisabledDays extends React.Component { }); }; render() { - const { selectedDay } = this.state; return (
- {selectedDay - ? selectedDay.toLocaleDateString() + {this.state.selectedDay + ? this.state.selectedDay.toLocaleDateString() : 'Please select a day 👻'}