Project

General

Profile

Actions

Feature #38231

closed

Limit the year to 4 digits in date input

Added by Go MAEDA 4 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
UI
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

Date input fields such as Start date and Due date accept up to 6 digits as a year.

The problem with this is that, for example, when the current date format is YYYY/MM/DD, the cursor automatically moves to the next DD part when a two-digit number is entered in the MM part, but not when a four-digit number is entered in the YY part. So, users should enter TAB to move the cursor from YYYY to MM. This UI inconsistency leads to erroneous input such as "202302-01" when you input "2023-02-01".

In Google Chrome and Microsoft Edge, this can be improved by set `max="9999-12-31"` to `<input type="date">` tags. When `max="9999-12-31"` is set, the cursor moves from YYYY to MM immediately after you finish entering the fourth digit in YYYY. The attached patch sets `max="9999-12-31"` to all date input fields.

The disadvantage of this patch is that you will not be able to enter a year with more than 5 digits, but this should not be a problem since I think that project management rarely deals with dates 8000 years in the future.


Files

Actions

Also available in: Atom PDF