code: function() {
        var items = this.fillCommon('d'), name, i,
        twoDigit = this.options.template.indexOf('DD') !== -1,
        daysCount = 31;
  
        // detect days count (depends on month and year)
        // originally https://github.com/vitalets/combodate/pull/7
        if (this.options.smartDays && this.$month && this.$year) {
          var month = parseInt(this.$month.val(), 10);
          var year = parseInt(this.$year.val(), 10);
  
          if (!isNaN(month) && !isNaN(year)) {
            daysCount = moment([year, month]).daysInMonth();
          }
        }
  
        for (i = 1; i <= daysCount; i++) {
          name = twoDigit ? this.leadZero(i) : i;
          items.push([i, name]);
        }
        return items;
      }
docs: /*
  fill day