Commit f265c257 authored by tkent's avatar tkent Committed by Commit bot

Android: Don't set the current minutes to the minutes field of <input type=time step=3600> dialog.

For <input type=time step=3600>, the minutes field should be disabled, and the
value should be the minutes of the minimum value, not the current time.
(Actually, it should be the minutes of the step-base value.  This CL adds TODO()
for it.)

Also, this CL fixes a bug for step>3600.  <input type=time step=5400> should
not disable the minutes field.

BUG=409791

Review URL: https://codereview.chromium.org/954363003

Cr-Commit-Position: refs/heads/master@{#318747}
parent 2f08432c
...@@ -155,11 +155,14 @@ public class MultiFieldTimePickerDialog ...@@ -155,11 +155,14 @@ public class MultiFieldTimePickerDialog
mMinuteSpinner.setMaxValue(59); mMinuteSpinner.setMaxValue(59);
} }
if (step >= HOUR_IN_MILLIS) { mMinuteSpinner.setValue(minute);
if (step % HOUR_IN_MILLIS == 0) {
mMinuteSpinner.setEnabled(false); mMinuteSpinner.setEnabled(false);
// TODO(tkent): We should set minutes value of
// WebDateTimeChooserParams::stepBase.
mMinuteSpinner.setValue(minMinute);
} }
mMinuteSpinner.setValue(minute);
mMinuteSpinner.setFormatter(twoDigitPaddingFormatter); mMinuteSpinner.setFormatter(twoDigitPaddingFormatter);
if (step >= MINUTE_IN_MILLIS) { if (step >= MINUTE_IN_MILLIS) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment