title: Disable submit button if dijit.form.DateTextBox is invalid
body: <pre><code>    When the user types the input in the dojotype="dijit.form.DateTextBox" as "Abcd" its shows the value entered is not valid.but its allowing the user to submit the form without any issues.
      I wanna disable the submit button if invalidmessage attribute of datetextbox shown up.
  </code></pre>
  
  <p>I m trying to implement the  function using the below code; Still i m not able to acheive  the functionality datatextbox.on is not triggering.I m new to dojo.Kindly help me on this.</p>
  
  <pre><code>function validateSubmit(){  
          alert('validate');
          var dateTextBox = dijit.byId("fromDedDate").get('value');
          alert('dateTextBox value '+dateTextBox);
          var dateTextBoxId = dijit.byId("fromDedDate");
          alert('dateTextBox id '+dateTextBoxId);
          var submitButton = document.getElementById('search');
          alert('submitButton '+submitButton);
          dateTextBox.on('change', function(e){
          var result = dateTextBox.validate();
          alert('result');
          });
  }
  
      &lt;form:input
                      path="deductionSearchFilter.deductionDateFrom" size='20'
                      id="fromDedDate" dojotype="dijit.form.DateTextBox"
                      onchange="dijit.byId('toDedDate').constraints.min = arguments[0];"
                      size="10" style="width: 114"
                      title="A single Deduction Date can be entered in the From/To fields or a range of Deduction Dates can be entered to search multiple days." /&gt;
      &lt;td align='center'&gt;&lt;input id="search" onclick="validateSubmit();" type="submit" name="Search"
                      value="Search" class="button" 
                      title="View the results of search" /&gt;
                  &lt;/td&gt;
  </code></pre>