HTML Input Type Date, Open Calendar by default

2019-02-06 00:37发布

I have a task which is to show the calendar by default to select date in the input field of html.

For suppose this is the code:

input type="date" name="bday"

Ok, now when I click on the input box, the calendar appears.

Tell me how to show the calendar by default without clicking on the input.

1条回答
太酷不给撩
2楼-- · 2019-02-06 01:07

This is not possible with native HTML input elements. You can use webshim polyfill, which gives you this option by using this markup.

<input type="date" data-date-inline-picker="true" />

Here is a small demo

查看更多
登录 后发表回答