<!DOCTYPE html>
<
html
>
<
head
>
<
title
>Input Date list property in HTML</
title
>
<
style
>
body
{
text-align: center;
}
</
style
>
</
head
>
<
body
>
<
h1
style
=
"color:green"
>GeeksforGeeks</
h1
>
<
h2
>Input Date list property</
h2
>
<
br
> Date Of Birth:
<
input
type
=
"date"
id
=
"Test_Date"
list
=
"dates_list"
>
<
datalist
id
=
"dates_list"
>
<
option
value
=
"2021-02-12"
/>
<
option
value
=
"2022-11-11"
/>
<
option
value
=
"1999-12-21"
/>
<
option
value
=
"2022-11-01"
/>
<
option
value
=
"1998-02-11"
/>
</
datalist
><
br
><
br
>
<
button
ondblclick
=
"My_Date()"
>Click Here!</
button
>
<
p
id
=
"test"
style
=
"font-size:20px"
></
p
>
<
script
>
function My_Date()
{
var x = document.getElementById("Test_Date").list.id;
document.getElementById("test").innerHTML = x;
}
</
script
>
</
body
>