Materialize datepicker SelectOnClose not working

Ilona picture Ilona · Apr 5, 2015 · Viewed 15.6k times · Source

I'm trying to create a datepicker with Materialize. According to the documentation the datepicker should close when the user selects a date.

That's not working in my page. I'm using the latest Chrome browser on Windows. I've tried IE browser, but there's the whole datepicker not showing...

Click here for my page (input 3 and 4 are datepickers)

My javascript:

Can anyone help me to fix these datepickers?

Answer

Kenath picture Kenath · Jan 13, 2016

Please add below few lines to your code..

onSet: function (ele) {
   if(ele.select){
          this.close();
   }
}