<input type="date" class="datepicker">
$('.datepicker').pickadate({
selectMonths: true, // Creates a dropdown to control month
selectYears: 15 // Creates a dropdown of 15 years to control year
});
Run Code Online (Sandbox Code Playgroud)
从日期选择器中选择日期后,当我们移动到窗口上的下一个选项卡时,再次返回当前窗口时,日期选择器已自动打开.