如何在materilize CSS中控制自动打开的Datepicker?

Mat*_*thi 2 html javascript css jquery materialize

演示链接

   <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)

从日期选择器中选择日期后,当我们移动到窗口上的下一个选项卡时,再次返回当前窗口时,日期选择器已自动打开.

mad*_*scu 6

尝试:

  $('.datepicker').pickadate({
    selectMonths: true, // Creates a dropdown to control month
    selectYears: 15, // Creates a dropdown of 15 years to control year
    onClose: function(){
        $('.datepicker').blur();
        $('.picker').blur();
       }
  });
Run Code Online (Sandbox Code Playgroud)

http://jsfiddle.net/7ujbv2yz/