Index: Source/core/html/HTMLInputElement.cpp |
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp |
index c35f154fd81cdb6d015e4ea478b9121db9dec279..25ee045f193cc0922abe660961518af7d4118d06 100644 |
--- a/Source/core/html/HTMLInputElement.cpp |
+++ b/Source/core/html/HTMLInputElement.cpp |
@@ -1845,9 +1845,13 @@ bool HTMLInputElement::setupDateTimeChooserParameters(DateTimeChooserParameters& |
for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement(options->item(i)); ++i) { |
if (!isValidValue(option->value())) |
continue; |
- parameters.suggestionValues.append(sanitizeValue(option->value())); |
- parameters.localizedSuggestionValues.append(localizeValue(option->value())); |
- parameters.suggestionLabels.append(option->value() == option->label() ? String() : option->label()); |
+ DateTimeSuggestion suggestion; |
+ suggestion.value = m_inputType->parseToNumber(option->value(), Decimal::nan()).toDouble(); |
+ if (std::isnan(suggestion.value)) |
+ continue; |
+ suggestion.localizedValue = localizeValue(option->value()); |
+ suggestion.label = option->value() == option->label() ? String() : option->label(); |
+ parameters.suggestions.append(suggestion); |
} |
} |
} |