BASILIO
BASILIO

Reputation: 887

How can user make input type date empty?

I wish to use the new input attribute from HTML5 DATE, only one problem, in the logic of the project, the user must be have the choice to delete the value, but i don't see, how to set empty value on this inputs

Upvotes: 11

Views: 47013

Answers (3)

Dash Riprock
Dash Riprock

Reputation: 11

<input type="date" name="NameItAnythingYouWant" value="">

Upvotes: 0

ATOzTOA
ATOzTOA

Reputation: 35950

Assuming you want to make the value shown to dd/mm/yyyy, then click on Clear button.

enter image description here

Upvotes: 5

Offbeatmammal
Offbeatmammal

Reputation: 8226

In HTML5 on Chrome the date picker popup has a "clear" button at the bottom (next to "today")

<input type="date" value="">

Upvotes: 5

Related Questions