Index: Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.cpp |
diff --git a/Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.cpp b/Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.cpp |
index 21d39a3312da26d7f03785b02abb83a62d036d86..83bfde6655a8b403a9bf434ddcc8ed46a77b9180 100644 |
--- a/Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.cpp |
+++ b/Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.cpp |
@@ -97,6 +97,14 @@ void BaseChooserOnlyDateAndTimeInputType::didChooseValue(const String& value) |
element().setValue(value, DispatchInputAndChangeEvent); |
} |
+void BaseChooserOnlyDateAndTimeInputType::didChooseValue(double value) |
+{ |
+ if (std::isnan(value)) |
+ element().setValue(String(), DispatchInputAndChangeEvent); |
tkent
2013/11/07 01:43:10
Are you sure this should be null string, not empty
|
+ else |
+ element().setValueAsNumber(value, ASSERT_NO_EXCEPTION, DispatchInputAndChangeEvent); |
+} |
+ |
void BaseChooserOnlyDateAndTimeInputType::didEndChooser() |
{ |
m_dateTimeChooser.clear(); |