mgcrea/angular-strap

View on GitHub
src/datepicker/datepicker.tpl.html

Summary

Maintainability
Test Coverage
<div class="dropdown-menu datepicker" ng-class="'datepicker-mode-' + $mode" style="max-width: 320px;" aria-hidden="true">
<table style="table-layout: fixed; height: 100%; width: 100%;">
  <thead>
    <tr class="text-center">
      <th>
        <button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$selectPane(-1)">
          <i class="{{$iconLeft}}"></i>
        </button>
      </th>
      <th colspan="{{ rows[0].length - 2 }}">
        <button tabindex="-1" type="button" class="btn btn-default btn-block text-strong"  ng-click="$toggleMode()">
          <strong style="text-transform: capitalize;" ng-bind="title"></strong>
        </button>
      </th>
      <th>
        <button tabindex="-1" type="button" class="btn btn-default pull-right" ng-click="$selectPane(+1)">
          <i class="{{$iconRight}}"></i>
        </button>
      </th>
    </tr>
    <tr ng-if="showLabels" ng-bind-html="labels"></tr>
  </thead>
  <tbody>
    <tr ng-repeat="(i, row) in rows" height="{{ 100 / rows.length }}%">
      <td class="text-center" ng-repeat="(j, el) in row">
        <button tabindex="-1" type="button" class="btn btn-default" style="width: 100%" ng-class="{'btn-primary': el.selected, 'btn-info btn-today': el.isToday && !el.selected}" ng-click="$select(el.date, el.disabled)" ng-disabled="el.disabled">
          <span ng-class="{'text-muted': el.muted}" ng-bind="el.label"></span>
        </button>
      </td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <td colspan="{{ rows[0].length }}">
        <div class="btn-group btn-group-justified" role="group">
          <div class="btn-group" role="group" ng-if="$hasToday">
            <button type="button" class="btn btn-default today " ng-click="$setToday()" ng-disabled="isTodayDisabled">
              <strong style="text-transform: capitalize;">Today</strong>
            </button>
          </div>
          <div class="btn-group" role="group" ng-if="$hasClear">
            <button type="button" class="btn btn-default clear" ng-click="$clear()">
              <strong style="text-transform: capitalize;">Clear</strong>
            </button>
          </div>
        </div>
      </td>
    </tr>
  </tfoot>
</table>
</div>