I have a default value set in my <input type=date>
and I would like to display only the calendar and not the input box.
I am trying to do it with Javascript
but without success as I show below:
var date = document.getElementById('date');
date.click();
input[type="date"]{
display: none;
}
<input id="date" type="date" value="2016-06-02" readonly>
As you can see, nothing is displayed (it does not seem that click
event could be apply to that input because it does not matter if I have it displayed or not, click event does not work).
I would like to show only the calendar(not the input) and make it read-only (already done) on the screen all the time that the webpage will be displayed.
Is it possible?
EDIT: For a better clarification, when I refer to calendar I mean to the calendar that is shown when you click on the input type=date
.
Thanks in advance!