diff --git a/platform/commonUI/general/res/templates/controls/datetime-field.html b/platform/commonUI/general/res/templates/controls/datetime-field.html index 47551fa25b..5f1705bc98 100644 --- a/platform/commonUI/general/res/templates/controls/datetime-field.html +++ b/platform/commonUI/general/res/templates/controls/datetime-field.html @@ -29,10 +29,12 @@ !structure.validate(ngModel[field])), 'picker-icon': structure.format === 'utc' || !structure.format }"> - - + + + +
xMax || y < yMin || y > yMax) { - scope.$eval(attrs.mctClickElsewhere); + scope.$apply(function () { + scope.$eval(attrs.mctClickElsewhere); + }); } } diff --git a/platform/commonUI/general/test/directives/MCTClickElsewhereSpec.js b/platform/commonUI/general/test/directives/MCTClickElsewhereSpec.js index 2e782a1a01..53924b0dd7 100644 --- a/platform/commonUI/general/test/directives/MCTClickElsewhereSpec.js +++ b/platform/commonUI/general/test/directives/MCTClickElsewhereSpec.js @@ -104,6 +104,8 @@ define( }); it("triggers an evaluation of its related Angular expression", function () { + expect(mockScope.$apply).toHaveBeenCalled(); + mockScope.$apply.mostRecentCall.args[0](); expect(mockScope.$eval) .toHaveBeenCalledWith(testAttrs.mctClickElsewhere); });