title: How to check selected value of datetime picker to be in some value range?
body: <p>I want to select a date  from a date time to be in a specific time range. I want to select a user's birthday in my datetime picker. I want to add only the users of age between 18-100 years. I want to check whether selected value of my datetime picker is greater than 18 years from today's date and selected value of date time picker less than 100 years from today's date. I tried this, but it gives me wrong output.</p>
  
  <pre><code>        if (dtpDOB.Value&lt;DateTime.Today.AddYears(-18)&amp;&amp; dtpDOB.Value&gt;DateTime.Today.AddYears(-100))
          {
              //
          }
  </code></pre>