🐞 - DateRange
+ minLength
/ maxLength
(with month
/ year
params) has incorrect limits
#1884
Open
2 of 9 tasks
Labels
Which package(s) are the source of the bug?
@maskito/kit
Playground Link
https://maskito.dev/kit/date-range/API?maxLength$=1
Description
Reproduction
Case 1
maxLength: {month: 1}
)01.01.2025 – 01.02.2025
Expected behavior:
31.01.2025
is max allowed end of date rangeActual behavior: mask allows to enter
01.02.2025
Case 2
maxLength: {month: 1}
)31.01.2025 – 03.03.2025
Expected behavior:
27.02.2025
is max allowed end of date rangeActual behavior: mask allows to enter
03.03.2025
Why the current behavior is incorrect ?
Explore Taiga UI's
CalendarRange
behavior:https://taiga-ui.dev/components/calendar-range/API?maxLength$=1 (
maxLength: {month: 1}
)calendar-range.mov
How to solve this issue ?
Modify the following logic
maskito/projects/kit/src/lib/utils/date/append-date.ts
Lines 3 to 21 in 802972a
to satisfy Taiga UI behavior.
Maskito version
3.2.0
Which browsers have you used?
Which operating systems have you used?
The text was updated successfully, but these errors were encountered: