angular-sb-date-select icon indicating copy to clipboard operation
angular-sb-date-select copied to clipboard

#7 Add possibility to pass custom template

Open simison opened this issue 9 years ago • 1 comments

Closes #7

Defaults to template coming with this directive, but allows overwriting it:

<div sb-date-select template-url="custom-date-selector.html" ng-model="myModel"></div>

<script type="text/ng-template" id="custom-date-selector.html">
  <h4>Custom date selector template example</h4>
  <div class="sb-date-select">
    <select class="sb-date-select-day sb-date-select-select" ng-class="selectClass" ng-model="val.date" ng-options="d for d in dates track by d">
      <option value disabled selected>Day</option>
    </select>
    <select class="sb-date-select-month sb-date-select-select" ng-class="selectClass" ng-model="val.month" ng-options="m.value as m.name for m in months">
      <option value disabled>Month</option>
    </select>
    <select class="sb-date-select-year sb-date-select-select" ng-class="selectClass" ng-model="val.year" ng-options="y for y in years">
      <option value disabled selected>Year</option>
    </select>
  </div>
</script>

I didn't add documentation to Readme yet, but I can add it later if you think this is a good addition and merge #6 first.

Cheers! :-)

simison avatar Feb 20 '16 16:02 simison

It's usefull PR!

@sambs can you agree this PR?

HawkeyePierce89 avatar Oct 23 '17 07:10 HawkeyePierce89