title: change datePattern of dijit date textbox on button click
body: <p>I am able to dynamically change some constraints of the Dijit <code>DateTextBox</code> but when I try to change the <code>datePattern</code>, it just doesn't work. For example:</p>
  
  <pre><code>var theDateWidget = dijit.byId(/*RefToDateTextBox*/);
  
  theDateWidget.constraints.max = new Date(); // works fine... :)
  
  theDateWidget.constraints.datePattern = "yyyy"; // does not work, it also harms the DateTimeTextBox widget,  I cannot select any value from drop down anymore
  </code></pre>
  
  <p>I first have a <code>datePattern = "dd/MM/yyyy"</code> set to the widget on creation and then later in the code I decide to change that pattern to <code>"yyyy"</code></p>
  
  <p>Anyone has any idea how can I change the <code>datePattern</code> of <code>DateTextBox</code> widget dynamically, say on button click.</p>