Skip to content

Date input with defaultValue regression in 15.2 #7233

Closed
@kellycampbell

Description

@kellycampbell

On Chrome browser or webview on Android, an <input type="date"> with a defaultValue specified does not show the defaultValue with react 15.2, but it works in 15.1.

I've tested on multiple devices, including tablets and phones. My phone has chrome/51.0.2704.81.

It works ok on Chrome desktop browser.

With React 15.1:
screenshot_20160708-194606

With React 15.2
screenshot_20160708-194726

Additionally, if you tap the blank date field, and select the date which is what the defaultValue was set to, it leaves the field blank and no onChange event is triggered.

Test case:
<input type="date" defaultValue='2016-07-08'/>

https://jsfiddle.net/kellycampbell/69z2wepo/48384/

Inspecting the elements rendered on the Android device via chrome devtools, the 15.1 version renders as:
<input type="date">

The 15.2 version renders with the value in the element:
<input type="date" value="2016-07-08">

This also affects <input type="time">, and possibly other types, but I've only tested date and time.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions