#2761·Inputmask

The inputmask plugin shows strange behavior when editing date/datetime value

Author: pbthapaCreated Dec 13, 2023Updated Jul 31, 2026

Issues:

  1. When the date is not empty and if you enter any number (say 1) in the day part, the day is immediately filled with that number but the cursor jumps to the month. For example: Enter the date 23/12/2023 with 'dd/mm/yyyy' format. The put the cursor at digit 2 of and enter any number (either 1, 2 or 3), the cursor jumps to month part without allowing day part to fill properly. Also, If you enter any number greater than 1 in the month part, the field is automatically filled with this value (with a leading 0) and the cursor jumps to the year part. image
  2. When you enter any digit in the year in the datetime field, all values behind that digit in the year and the time are deleted. The datetime format is 'dd/mm/yyyy HH:MM:ss'. image

JQuery version: 3.7.1 Inputmask plugin version: 5.0.8

Codepen link to the issue: https://codepen.io/PUSHPA2019/pen/JjxqJbp?editors=1010

Is this known issue or some configuration is missing?