Inputmask icon indicating copy to clipboard operation
Inputmask copied to clipboard

Disable autocomplete for date-alias

Open RemediumAnimus opened this issue 9 years ago • 2 comments

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

RemediumAnimus avatar Jan 27 '16 08:01 RemediumAnimus

@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.

RobinHerbots avatar Jan 27 '16 13:01 RobinHerbots

@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.

doox911-opensource avatar Apr 18 '23 08:04 doox911-opensource