React.js: disable DateTime when changed to the past <p>I'm using react-datetime and want to disable anyone from being able to select a date/time in the past as this will send emails that shouldn't appear to have been sent in the past. <a href="https://www.npmjs.com/package/react-datetime" rel="nofollow">Documentation</a> shows me how to disable dates before but when I tried to disable minutes, it can still be changed manually in the drop down box of the calendar. Code below is part of a large email platform but should be able to make some sense with the snippets. File lives <a href="https://github.com/Financial-Times/email-meme-frontend/blob/master/src/components/Emails/EmailSendDialog.js" rel="nofollow">here</a> and you can see the entire repo there as well.</p> <p>Ideally, if someone selects a date or time that's one minute or more in the past, it should jump back to current and only be able to 'send' if in the present moment. Any help would be fab - thanks!</p> <pre><code> isValidDate(dt) { return (dt &gt;= (moment().startOf('day'))) &amp;&amp; (dt &lt;= moment().add(30, 'days')) &amp;&amp; moment().subtract(1, 'minute'); } </code></pre> <p>I've already tried the above but still let's you edit manually :(</p> <pre><code>class EmailSendDialog extends Component { constructor(props) { super(props); this.state = { listId: null, now: true, date: moment(), tz: this.defaultTz }; } handleDateTimeSelect(date) { this.setState({ date }); } isValidDate(dt) { return (dt &gt;= (moment().startOf('day'))) &amp;&amp; (dt &lt;= moment().add(30, 'days')) &amp;&amp; moment().subtract(1, 'minute'); } </code></pre> <p>To render, I have this:</p> <pre><code> &lt;DateTime value={date} dateFormat="D MMM YYYY" isValidDate={this.isValidDate} onChange={(_date) =&gt; this.handleDateTimeSelect(_date)} /&gt; </code></pre>