DatePicker throws exception on changing Month : <p>Changing the month of a DatePicker throws this exception:</p>

<blockquote>
  <p>System.Windows.Automation.ElementNotAvailableException: 'Element does
  not exist or it is virtualized; use VirtualizedItem Pattern if it is
  supported.'</p>
</blockquote>

<p>The Stack Trace:</p>

<blockquote>
  <p>at MS.Internal.Automation.ElementUtil.Invoke(AutomationPeer peer,
  DispatcherOperationCallback work, Object arg) at
  MS.Internal.Automation.ElementProxy.GetPropertyValue(Int32 property)</p>
</blockquote>

<p>I created a simple project with only one DatePicker on the main window and it gives the same exception.</p>

<pre><code>&lt;DatePicker x:Name="datePicker1" Width="150" /&gt;
</code></pre>

<p>.NET Framework version: 4.6</p>

<p>I found the same problem in a 6 years old <a href="https://stackoverflow.com/q/6136966/2084193">question</a>, but no answer till now!</p>

<p><strong>Edit</strong>:</p>

<p>I tried different .NET Framework versions: 4.5, 4.6.1, and the problem still the same.</p>
