angular-sb-date-select
angular-sb-date-select copied to clipboard
#7 Add possibility to pass custom template
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! :-)
It's usefull PR!
@sambs can you agree this PR?