title: Bootstrap 3 datepicker - minDate and maxDate
body: <p><a href="http://eonasdan.github.io/bootstrap-datetimepicker/" rel="noreferrer">http://eonasdan.github.io/bootstrap-datetimepicker/</a></p>
  
  <p>Hi</p>
  
  <p>I am trying to use the min max date options but not sure how to use it as the documentation doesn't provide example code.</p>
  
  <p>I found on stackoverflow that you can do this:</p>
  
  <p>minDate: moment()</p>
  
  <p>But that throws an error that moment is not defined.</p>
  
  <p>I am guessing it can't find the moment.js which is included on the page otherwise the plugin wouldn't work.</p>
  
  <p>What I am trying to achieve is to disable 10 days before the current day and show 30 days from the current day.</p>
  
  <p>Thanks</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>Here is the code (I have removed everything except whats important to simply show the code):
  
  window[ns] = window[ns] || {};
  (function ($, moment, app) {
      'use strict';
  
      // Private Methods
      var nameSpace = 'global',
          globalDataObject = null,
  
         
          notifyRenderCallbacks = function (pageName) {
  
              if ($('.js-calendar').length) {
                  $('.js-calendar').datetimepicker({
                      format: 'DD MMMM YYYY',
                      dayViewHeaderFormat: 'MMMM YYYY',
                      icons: {
                          next: 'icon icon-chevronright',
                          previous: 'icon icon-chevronleft'
                      },
                      enabledDates: moment().add(30, 'days')
                  });
  
              }
  
          },
  
  
  
      // If this module requires global data
  
      app.register(nameSpace, initialize);
  
  
  }(jQuery, moment, window[ns] || {}));</code></pre>
  </div>
  </div>
  </p>