Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Inability to enter a date between the minimum and maximum. #2816

Open
fabricioIncredible opened this issue Aug 21, 2024 · 0 comments
Open

Inability to enter a date between the minimum and maximum. #2816

fabricioIncredible opened this issue Aug 21, 2024 · 0 comments

Comments

@fabricioIncredible
Copy link

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_/____".

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant