Skip to content

Commit

Permalink
Support keyboard input in date/time picker
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenn Jacobsen authored and nul800sebastiaan committed Jun 25, 2019
1 parent 014eba9 commit bd8e344
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ function dateTimePickerController($scope, notificationsService, assetsService, a
setDate(date);
setDatePickerVal();
};

$scope.inputChanged = function() {
setDate($scope.model.datetimePickerValue);
setDatePickerVal();
}

//here we declare a special method which will be called whenever the value has changed from the server
//this is instead of doing a watch on the model.value = faster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
id="{{model.alias}}"
type="text"
ng-model="model.datetimePickerValue"
ng-blur="inputChanged()"
ng-required="model.validation.mandatory"
val-server="value"
class="datepickerinput">
Expand Down

0 comments on commit bd8e344

Please sign in to comment.