Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(702)

Unified Diff: Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp

Issue 23623017: Prepare for date/time input datalist support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp
diff --git a/Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp b/Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp
index e595534e97baa6d5bbfe49ba8990e8f6428a1663..d8095fe41d2c55a1f7f4d47aa075ed3c7c46eb36 100644
--- a/Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp
+++ b/Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp
@@ -262,6 +262,14 @@ void BaseMultipleFieldsDateAndTimeInputType::pickerIndicatorChooseValue(const St
edit->setOnlyYearMonthDay(date);
}
+void BaseMultipleFieldsDateAndTimeInputType::pickerIndicatorChooseValue(double value)
+{
+ if (std::isnan(value))
+ element().setValue(String(), DispatchInputAndChangeEvent);
tkent 2013/11/07 01:43:10 Ditto.
+ else
+ element().setValueAsNumber(value, ASSERT_NO_EXCEPTION, DispatchInputAndChangeEvent);
+}
+
bool BaseMultipleFieldsDateAndTimeInputType::setupDateTimeChooserParameters(DateTimeChooserParameters& parameters)
{
return element().setupDateTimeChooserParameters(parameters);

Powered by Google App Engine
This is Rietveld 408576698