Fix the "Automatic dark mode" labels having the same name. Now the correct input is selected when clicking the "To" label.

This commit is contained in:
Stefan Sundin 2021-04-02 22:48:20 -07:00 committed by Sean Yesmunt
parent 56d4a677a5
commit aff8cfdf9c

View file

@ -289,7 +289,7 @@ class SettingsPage extends React.PureComponent<Props, State> {
<fieldset-group class="fieldset-group--smushed">
<FormField
type="select"
name="automatic_dark_mode_range"
name="automatic_dark_mode_range_start"
onChange={(value) => this.onChangeTime(value, { fromTo: 'from', time: 'hour' })}
value={darkModeTimes.from.hour}
label={__('From --[initial time]--')}
@ -302,7 +302,7 @@ class SettingsPage extends React.PureComponent<Props, State> {
</FormField>
<FormField
type="select"
name="automatic_dark_mode_range"
name="automatic_dark_mode_range_end"
label={__('To --[final time]--')}
onChange={(value) => this.onChangeTime(value, { fromTo: 'to', time: 'hour' })}
value={darkModeTimes.to.hour}