taiga-family / maskito

Collection of libraries to create an input mask which ensures that user types value according to predefined format.
https://maskito.dev
Apache License 2.0
571 stars 19 forks source link

🐞 - `DateRange` should accept single character date segment during paste when date separated by '-' sign #1256

Open stanislav-osipov opened 1 month ago

stanislav-osipov commented 1 month ago

Which package(s) are the source of the bug?

@maskito/kit

Playground Link

https://maskito.dev/kit/date-range/API

Description

Original issue https://github.com/taiga-family/maskito/issues/593 fixes the problem for dates formatted with dots like 11.9.2022. The bug still can be reproduced with dates like 11-9-2022 or 7-10-2020 for DateRange only. Works fine for Date and DateTime.

Steps to reproduce https://maskito.dev/kit/date-range/API?mode=dd%2Fmm%2Fyyyy

Paste 11-9-2022 ✅ Expected behaviour: Textfield contains 11.09.2022

❌ Actual behaviour: Textfield contains 11.09.022

Maskito version

2.3.2

Which browsers have you used?

Which operating systems have you used?

Suldenkov commented 3 days ago

Hi! I`ll take it