From d1dbca53646d4735ff9f5364a430dbd53e4b1d9c Mon Sep 17 00:00:00 2001 From: EverPresent Date: Tue, 11 Nov 2014 00:13:20 -0600 Subject: [PATCH] (input): return original value from formatter if isEmpty, not '' Fix the formatter on the input[type=date] to return the original value if the value evaluates to falsey. It was previously returning an empty string with was causing the underlying model to be modified upon binding. Closes #9996 --- src/ng/directive/input.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js index 639afcb9dfcb..901f671b80c7 100644 --- a/src/ng/directive/input.js +++ b/src/ng/directive/input.js @@ -1138,7 +1138,7 @@ function createDateInputType(type, regexp, parseDate, format) { } else { previousDate = null; } - return ''; + return value; }); if (isDefined(attr.min) || attr.ngMin) {