RobinHerbots/Inputmask

Inability to enter a date between the minimum and maximum.

fabricioIncredible opened this issue · 0 comments

When entering the min for today and the maximum for 2 months from now, I cannot enter a day that has already passed in this month.

Example:
Min: 08/21/2024
Max: 10/21/2024

I can't put any day before 21, such as 10, even though 09/10/2024 is within the limit.

This is the code:

const hoje = new Date;
const maximo = new Date;
maximo.setMonth(maximo.getMonth() + 2);

$(this.inputPrimeiraMensalidade).inputmask({
    min: hoje.toLocaleDateString('pt'), // 21/08/2024
    max: maximo.toLocaleDateString('pt'), // 21/10/2024
    inputFormat: 'dd/mm/yyyy',
    placeholder: '__/__/____',
    alias: 'datetime',
    clearIncomplete: true
});

Also, using Flatpickr calendar library, if I try to select the date 09/10/2024, the inputmask displays "22/0_/____".