Skip to content

Clear button on iOS date input does not return correct event value #8938

Open
@ro-savage

Description

@ro-savage

Bug
For iOS only.
When pressing clear on a date input, the onChange event is fired but event.target.value is showing the original value rather than an empty string.

What is the current behavior?
On Chrome and Android, when the clear button is pressed the onChange event has a value of ''.
On iOS when the clear button is pressed the onChange event has a value of previousValue.

Demo
https://output.jsbin.com/zojuteloto/5/
Try on Chrome/Android. Then on iOS.

What is the expected behavior?
Value should be returned an an empty string.

Versions
Affects React 15+ & iOS 10. Unsure of previous versions.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions