Index: third_party/WebKit/Source/core/html/forms/DateTimeLocalInputType.cpp |
diff --git a/third_party/WebKit/Source/core/html/forms/DateTimeLocalInputType.cpp b/third_party/WebKit/Source/core/html/forms/DateTimeLocalInputType.cpp |
index 86babf919a13e4d67a600407584e739893f81baa..7fab00de45ab0bd927b9b7aabca6e2ab5ac7ed15 100644 |
--- a/third_party/WebKit/Source/core/html/forms/DateTimeLocalInputType.cpp |
+++ b/third_party/WebKit/Source/core/html/forms/DateTimeLocalInputType.cpp |
@@ -52,6 +52,13 @@ InputType* DateTimeLocalInputType::create(HTMLInputElement& element) { |
return new DateTimeLocalInputType(element); |
} |
+String DateTimeLocalInputType::sanitizeValue(const String& proposedValue) const { |
+ DateComponents date; |
+ if (proposedValue.isEmpty() || !parseToDateComponents(proposedValue, &date)) |
+ return emptyString(); |
+ return date.toString(); |
+} |
+ |
void DateTimeLocalInputType::countUsage() { |
countUsageIfVisible(UseCounter::InputTypeDateTimeLocal); |
} |