RobinHerbots / Inputmask

Input Mask plugin
https://robinherbots.github.io/Inputmask/
MIT License
6.4k stars 2.17k forks source link

Disable autocomplete for date-alias #1168

Open RemediumAnimus opened 8 years ago

RemediumAnimus commented 8 years ago

Hello, can i disable autocomplete date mask for year ? Example: yearrange: {minyear: 1916,maxyear:2016} If i write 12, it is autocomplete 2012

RobinHerbots commented 8 years ago

@RemediumAnimus ,

You can do this by overriding the isInYearRange fn within the "dd/mm/yyyy" alias Something like

Inputmask("date",  {
   isInYearRange: function(chrs, minyear, maxyear) {
                //do some checking
return true/false,
            }
}).mask(selector);

Or by extending the alias.

doox911-opensource commented 1 year ago

@RemediumAnimus ,

You can do this by overriding the isInYearRange fn within the "dd/mm/yyyy" alias Something like

Inputmask("date",  {
   isInYearRange: function(chrs, minyear, maxyear) {
                //do some checking
return true/false,
            }
}).mask(selector);

Or by extending the alias.

Options does not have property isInYearRange. But, property prefillYear: false works for me.