fng-bootstrap-datetime 0.12.0-beta.221 → 0.12.0-beta.223
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -199,14 +199,18 @@ angular.module('ui.bootstrap.datetimepicker', ["ui.bootstrap.dateparser", "ui.bo
|
|
199
199
|
$scope.ngModel = new Date($scope.ngModel); // By default, ngModel watches the model by reference, not value. This is important to know when binding inputs to models that are objects (e.g. Date) (from: https://docs.angularjs.org/api/ng/directive/ngModel)
|
200
200
|
}
|
201
201
|
getForm();
|
202
|
-
form
|
202
|
+
if (form) {
|
203
|
+
form.$setDirty();
|
204
|
+
}
|
203
205
|
};
|
204
206
|
$scope.time_change = function () {
|
205
207
|
if ($scope.ngModel && $scope.time) {
|
206
208
|
$scope.ngModel.setHours($scope.time.getHours(), $scope.time.getMinutes(), 0, 0);
|
207
209
|
$scope.ngModel = new Date($scope.ngModel); // By default, ngModel watches the model by reference, not value. This is important to know when binding inputs to models that are objects (e.g. Date) (from: https://docs.angularjs.org/api/ng/directive/ngModel)
|
208
210
|
getForm();
|
209
|
-
form
|
211
|
+
if (form) {
|
212
|
+
form.$setDirty();
|
213
|
+
}
|
210
214
|
} // else the time is invalid, keep the current Date value in datepicker
|
211
215
|
};
|
212
216
|
$scope.open = function ($event) {
|