title: jQuery Bootstrap From and To date validation
body: <p>I have been playing with bootstrap calendar.</p>
  
  <p>I have used this date picker - <a href="http://bootstrap-datepicker.readthedocs.org/en/release/" rel="nofollow">http://bootstrap-datepicker.readthedocs.org/en/release/</a></p>
  
  <p>My code looks like this. I was able to select the from and to date using the above docs/code.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $('#datepicker.input-daterange').datepicker({
      startDate: "",
      endDate: "",
      format: "yyyy-mm-dd",
      todayBtn: "linked",
      autoclose: true,
      todayHighlight: true
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Now I would like to validate this jquery script. </p>
  
  <p>Meaning: The user should be able to select <em>ANY</em> twelve months and it should not go beyond that.</p>
  
  <p>In other words, <em>Apr-2013</em> to <em>Mar-2014</em> should be possible (since there are twelve months) and <em>Apr-2013</em> to <em>Apr-2014</em> should not be possible since it has 13 months in it and I need to throw an error message and ask the user to correct the From and To date. </p>
  
  <p>Is there anything like this I can do with the above jQuery like:</p>
  
  <pre><code>length: "12m"
  </code></pre>
  
  <p>Please guide me. The user should be able to select <strong>ANY YEAR</strong> <em>(like Apr'2011 to Mar'2012)</em> but anything should be within 12 months. </p>
  
  <p>Thanks,
  Kimz        </p>