taiga-family/maskito

๐Ÿž - `DateRange` should accept single character date segment during paste when date separated by '-' sign

stanislav-osipov opened this issue ยท 3 comments

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

@maskito/kit

Playground Link

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

Description

Original issue #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?

  • Chrome
  • Firefox
  • Safari
  • Edge

Which operating systems have you used?

  • macOS
  • Windows
  • Linux
  • iOS
  • Android

Hi! I`ll take it

@Suldenkov Hello!
Any updates ?

@Suldenkov Hello! Any updates ?

Hi! I found the cause of the error, but I don't know how to fix it yet. Because the original string uses a split by '-', it's not clear how to distinguish them