<h3 dir="auto">Problem description</h3>
<p dir="auto"><code class="notranslate">DatePicker</code> <code class="notranslate">onDismiss</code> function called, when select date.<br>
Here's working <a href="https://www.webpackbin.com/bins/-KlPNcoGu2kPB4zDUmwz" rel="nofollow">bin</a> that reproduces the problem.<br>
Materi UI version: 0.18.1</p>
<p dir="auto">Actually, it worked fine on 0.18.0 version.</p>
<h2 dir="auto">Feature request</h2>
<h3 dir="auto">Description</h3>
<p dir="auto">I think it's ok to call <code class="notranslate">dismiss</code> function when date is changed. My case:<br>
I have two DatePickers, when I select date from first one, it closes (<code class="notranslate">autoOk</code> prop) and then I open second picker automatically with prefilled date (based on value in first picker). If user doesn't change value in second picker, and just close it, it will trigger <code class="notranslate">dismiss</code> function. If user change date, it will trigger only <code class="notranslate">handleTouchTapOk</code> function. I think it's more logical to trigger <code class="notranslate">dismiss</code> always when <code class="notranslate">open</code> changes to <code class="notranslate">false</code>.<br>
For now I must use same handler for <code class="notranslate">onDismiss</code> and <code class="notranslate">onChange</code> to catch this case, and I really don't like this solution.</p>
<h3 dir="auto">Possible solution</h3>
<p dir="auto">before</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="  handleTouchTapOk = () =&gt; {
    if (this.props.onAccept &amp;&amp; !this.refs.calendar.isSelectedDateDisabled()) {
      this.props.onAccept(this.refs.calendar.getSelectedDate());
    }

    this.setState({
      open: false,
    });
  };"><pre class="notranslate">  <span class="pl-en">handleTouchTapOk</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-c1">onAccept</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-c1">!</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">refs</span><span class="pl-kos">.</span><span class="pl-c1">calendar</span><span class="pl-kos">.</span><span class="pl-en">isSelectedDateDisabled</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
      <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-en">onAccept</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">refs</span><span class="pl-kos">.</span><span class="pl-c1">calendar</span><span class="pl-kos">.</span><span class="pl-en">getSelectedDate</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>

    <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">setState</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
      <span class="pl-c1">open</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
    <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">after</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="  handleTouchTapOk = () =&gt; {
    if (this.props.onAccept &amp;&amp; !this.refs.calendar.isSelectedDateDisabled()) {
      this.props.onAccept(this.refs.calendar.getSelectedDate());
    }

    this.dismiss();
  };"><pre class="notranslate">  <span class="pl-en">handleTouchTapOk</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-c1">onAccept</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-c1">!</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">refs</span><span class="pl-kos">.</span><span class="pl-c1">calendar</span><span class="pl-kos">.</span><span class="pl-en">isSelectedDateDisabled</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
      <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-en">onAccept</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">refs</span><span class="pl-kos">.</span><span class="pl-c1">calendar</span><span class="pl-kos">.</span><span class="pl-en">getSelectedDate</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>

    <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">dismiss</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">I can create PR for this.</p>