RobinHerbots / Inputmask

Input Mask plugin
https://robinherbots.github.io/Inputmask/
MIT License
6.39k stars 2.17k forks source link

Automatic change the day when the only month is edited and the last day of the month was specified #1734

Open vedes opened 6 years ago

vedes commented 6 years ago

Let the mask is dd.mm.yyy and the entered date is 31.10.2017. Under these conditions, it is not possible to change the month to September (09), since the value of 31.09.2017 does not pass validation. However, this behavior is not user friendly when it comes to the date range. I think for cases when the user changes only the month and the last day of the month was set before editing then need to set last day of entered month automatically.

I have already prepared changes to the inputmask.date.extensions.js file and plan to publish them soon. Was there anyone else with this problem?

RobinHerbots commented 6 years ago

@vedes ,

There was a problem with your previous PR. I had to revert and made some changes myself.
Anyway, allowing to change the month in that case brings a better user experience. This also needs tobe implemented in the 4.x branch.

vedes commented 6 years ago

Robin, thanks for the reply! The fact that users complained to me about the behavior of Inputmask in this issue. I took the latest version Inputmask (3.3.10), and it has the same problem. The fact that when you edit an already entered date 31.10.2017 you can't change the month is not a mistake. The mask is designed to limit incorrect input. But users perceive this behavior as an error. I will make changes in the branch 3.X and you decide how these changes use.