title: Bootstrap Datetimepicker - Set year ranges or max/last year
body: <p><strong>Update: I am willing to add a bounty to this question if someone knows how to achieve this.</strong></p>
  
  <p>I cannot find anywhere in the <a href="https://eonasdan.github.io/bootstrap-datetimepicker/Options/" rel="nofollow noreferrer">documentation</a> how to set the max year or a custom year range on the <code>viewMode: 'years'</code> option.</p>
  
  <p>I am using a setup like this:</p>
  
  <pre><code>$('#create-new-game-release-date-input').datetimepicker({
      viewMode: 'years',
      maxDate: moment()
  });
  </code></pre>
  
  <p>However, all the <code>maxDate</code> option does is prevent you from clicking a year in the future, it doesn't hide them.</p>
  
  <p>This presents a dialogue like this:</p>
  
  <p><a href="https://i.stack.imgur.com/2hZbe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2hZbe.png" alt="viewMode: years diaglogue"></a></p>
  
  <p>However, I would prefer it showed only up to the current year (2016) so that more past years would fit on the page. In other words, I'd like the default range to go from 2005-2016 instead of from 2011-2022.</p>
  
  <p>I tried reading through the plugin itself and modifying the code, but all I did was break it. Was curious if anyone else has experience doing this before I dive into it too deeply.</p>