docs: function DatePicker( picker, settings ) {
  
      var calendar = this,
          element = picker.$node[ 0 ],
          elementValue = element.value,
          elementDataValue = picker.$node.data( 'value' ),
          valueString = elementDataValue || elementValue,
          formatString = elementDataValue ? settings.formatSubmit : settings.format,
          isRTL = function() {
  
              return element.currentStyle ?
  
                  // For IE.
                  element.currentStyle.direction == 'rtl' :
  
                  // For normal browsers.
                  getComputedStyle( picker.$root[0] ).direction == 'rtl'
          }
  
      calendar.settings = settings
      calendar.$node = picker.$node
  
      // The queue of methods that will be used to build item objects.
      calendar.queue = {
          min: 'measure create',
          max: 'measure create',
          now: 'now create',
          select: 'parse create validate',
          highlight: 'parse navigate create validate',
          view: 'parse create validate viewset',
          disable: 'deactivate',
          enable: 'activate'
      }
  
      // The component's item object.
      calendar.item = {}
  
      calendar.item.clear = null
      calendar.item.disable = ( settings.disable || [] ).slice( 0 )
      calendar.item.enable = -(function( collectionDisabled ) {
          return collectionDisabled[ 0 ] === true ? collectionDisabled.shift() : -1
      })( calendar.item.disable )
  
      calendar.
          set( 'min', settings.min ).
          set( 'max', settings.max ).
          set( 'now' )
  
      // When there’s a value, set the `select`, which in turn
      // also sets the `highlight` and `view`.
      if ( valueString ) {
          calendar.set( 'select', valueString, { format: formatString })
      }
  
      // If there’s no value, default to highlighting “today”.
      else {
          calendar.
              set( 'select', null ).
              set( 'highlight', calendar.item.now )
      }
  
  
      // The keycode to movement mapping.
      calendar.key = {
          40: 7, // Down
          38: -7, // Up
          39: function() { return isRTL() ? -1 : 1 }, // Right
          37: function() { return isRTL() ? 1 : -1 }, // Left
          go: function( timeChange ) {
              var highlightedObject = calendar.item.highlight,
                  targetDate = new Date( highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange )
              calendar.set(
                  'highlight',
                  targetDate,
                  { interval: timeChange }
              )
              this.render()
          }
      }
  
  
      // Bind some picker events.
      picker.
          on( 'render', function() {
              picker.$root.find( '.' + settings.klass.selectMonth ).on( 'change', function() {
                  var value = this.value
                  if ( value ) {
                      picker.set( 'highlight', [ picker.get( 'view' ).year, value, picker.get( 'highlight' ).date ] )
                      picker.$root.find( '.' + settings.klass.selectMonth ).trigger( 'focus' )
                  }
              })
              picker.$root.find( '.' + settings.klass.selectYear ).on( 'change', function() {
                  var value = this.value
                  if ( value ) {
                      picker.set( 'highlight', [ value, picker.get( 'view' ).month, picker.get( 'highlight' ).date ] )
                      picker.$root.find( '.' + settings.klass.selectYear ).trigger( 'focus' )
                  }
              })
          }, 1 ).
          on( 'open', function() {
              var includeToday = ''
              if ( calendar.disabled( calendar.get('now') ) ) {
                  includeToday = ':not(.' + settings.klass.buttonToday + ')'
              }
              picker.$root.find( 'button' + includeToday + ', select' ).attr( 'disabled', false )
          }, 1 ).
          on( 'close', function() {
              picker.$root.find( 'button, select' ).attr( 'disabled', true )
          }, 1 )
  
  }