Skip to content

Commit

Permalink
feat(time selector): Add option to make time selector required or not…
Browse files Browse the repository at this point in the history
…, default to not
  • Loading branch information
welchyd committed Feb 13, 2019
1 parent 821c409 commit d4dcef0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/os/ui/data/descriptorprovider.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ os.ui.data.DescriptorProvider.prototype.removeDescriptor = function(descriptor,
/**
* Get the descriptors registered to this provider.
* @return {!Array.<T>} The descriptors
* @protected
*/
os.ui.data.DescriptorProvider.prototype.getDescriptors = function() {
var dm = os.dataManager;
Expand Down
3 changes: 2 additions & 1 deletion src/os/ui/time/time.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ os.ui.time.timeDirective = function() {
scope: {
'hours': '=',
'mins': '=',
'secs': '='
'secs': '=',
'isRequired': '=?'
},
templateUrl: os.ROOT + 'views/time/time.html',
controllerAs: 'time'
Expand Down
6 changes: 3 additions & 3 deletions views/time/time.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="form-inline">
<input class="form-control c-date-time__time-input" type="number" ng-model="hours" min="0" max="23" placeholder="h"> :
<input class="form-control c-date-time__time-input" type="number" ng-model="mins" min="0" max="59" placeholder="m"> :
<input class="form-control c-date-time__time-input" type="number" ng-model="secs" min="0" max="59" placeholder="s">
<input class="form-control c-date-time__time-input" type="number" ng-model="hours" ng-required="isRequired" min="0" max="23" placeholder="h"> :
<input class="form-control c-date-time__time-input" type="number" ng-model="mins" ng-required="isRequired" min="0" max="59" placeholder="m"> :
<input class="form-control c-date-time__time-input" type="number" ng-model="secs" ng-required="isRequired" min="0" max="59" placeholder="s">
</div>

0 comments on commit d4dcef0

Please sign in to comment.