Date editor allows six-digit year to be inputted #2758

Closed
opened 2026-02-05 06:59:23 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @Krolitian on GitHub (Apr 5, 2024).

The bug

The Date and Time editor allows for the year to be up to six digits, depending on the numbers put in.

Here's what I found during testing that may help you diagnose the issue:

  1. 6 digits are allowed up to 275769, but anything above 275760 till 275769 gets reverted to 275760.
  2. Anything above 275769 gets converted to a 5-digit year, all the way to the limit of 99999.
  3. 000000 gets converted to 0001 which seems intentional.
  4. This is website-only, the mobile app properly recognizes the out-of-bounds numbers.

Intended function:
After typing in 4 digits, it moves to the Hour input field, not after 5-6 digits.

Screenshot 2024-04-04 at 11 57 19 PM

The OS that Immich Server is running on

Unraid

Version of Immich Server

v1.101.0

Version of Immich Mobile App

v1.100.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

docker run
  -d
  --name='immich'
  --net='bridge'
  -e TZ="America/New_York"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="Monolith"
  -e HOST_CONTAINERNAME="immich"
  -e 'DB_HOSTNAME'='<URL>'
  -e 'DB_USERNAME'='postgres'
  -e 'DB_PASSWORD'='postgres'
  -e 'DB_DATABASE_NAME'='immich'
  -e 'REDIS_HOSTNAME'='localhost'
  -e 'DB_PORT'='5433'
  -e 'REDIS_PORT'='6379'
  -e 'REDIS_PASSWORD'=''
  -e 'MACHINE_LEARNING_GPU_ACCELERATION'=''
  -e 'MACHINE_LEARNING_WORKERS'='1'
  -e 'MACHINE_LEARNING_WORKER_TIMEOUT'='120'
  -e 'DOCKER_MODS'='imagegenius/mods:universal-redis'
  -e 'PUID'='99'
  -e 'PGID'='100'
  -e 'UMASK'='022'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.webui='http://[IP]:[PORT:8080]'
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/imagegenius/templates/main/unraid/img/immich.png'
  -p '8008:8080/tcp'
  -v '/mnt/user/photos_immich/':'/photos':'rw'
  -v '/mnt/user/appdata/immich':'/config':'rw' 'ghcr.io/imagegenius/immich:latest'

Your .env content

dunno where it is

Reproduction steps

1. Edit Date and Time.
2. Put more than 4 year digits in.
...
69. Profit

Additional information

This was also discovered on v1.100.0, so not a v1.101.0-created issue.

Originally created by @Krolitian on GitHub (Apr 5, 2024). ### The bug The Date and Time editor allows for the year to be up to six digits, depending on the numbers put in. Here's what I found during testing that may help you diagnose the issue: 1. 6 digits are allowed up to 275769, but anything above 275760 till 275769 gets reverted to 275760. 2. Anything above 275769 gets converted to a 5-digit year, all the way to the limit of 99999. 3. 000000 gets converted to 0001 which seems intentional. 4. This is website-only, the mobile app properly recognizes the out-of-bounds numbers. Intended function: After typing in 4 digits, it moves to the Hour input field, not after 5-6 digits. <img width="476" alt="Screenshot 2024-04-04 at 11 57 19 PM" src="https://github.com/immich-app/immich/assets/82565931/f417075c-82aa-4511-ade8-a64bc821f909"> ### The OS that Immich Server is running on Unraid ### Version of Immich Server v1.101.0 ### Version of Immich Mobile App v1.100.0 ### Platform with the issue - [ ] Server - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML docker run -d --name='immich' --net='bridge' -e TZ="America/New_York" -e HOST_OS="Unraid" -e HOST_HOSTNAME="Monolith" -e HOST_CONTAINERNAME="immich" -e 'DB_HOSTNAME'='<URL>' -e 'DB_USERNAME'='postgres' -e 'DB_PASSWORD'='postgres' -e 'DB_DATABASE_NAME'='immich' -e 'REDIS_HOSTNAME'='localhost' -e 'DB_PORT'='5433' -e 'REDIS_PORT'='6379' -e 'REDIS_PASSWORD'='' -e 'MACHINE_LEARNING_GPU_ACCELERATION'='' -e 'MACHINE_LEARNING_WORKERS'='1' -e 'MACHINE_LEARNING_WORKER_TIMEOUT'='120' -e 'DOCKER_MODS'='imagegenius/mods:universal-redis' -e 'PUID'='99' -e 'PGID'='100' -e 'UMASK'='022' -l net.unraid.docker.managed=dockerman -l net.unraid.docker.webui='http://[IP]:[PORT:8080]' -l net.unraid.docker.icon='https://raw.githubusercontent.com/imagegenius/templates/main/unraid/img/immich.png' -p '8008:8080/tcp' -v '/mnt/user/photos_immich/':'/photos':'rw' -v '/mnt/user/appdata/immich':'/config':'rw' 'ghcr.io/imagegenius/immich:latest' ``` ### Your .env content ```Shell dunno where it is ``` ### Reproduction steps ```bash 1. Edit Date and Time. 2. Put more than 4 year digits in. ... 69. Profit ``` ### Additional information This was also discovered on v1.100.0, so not a v1.101.0-created issue.
OVERLORD added the good first issue🖥️web labels 2026-02-05 06:59:23 +03:00
Author
Owner

@aviv926 commented on GitHub (Apr 8, 2024):

I remember we had a problem like this and it was fixed
Apparently there is something causing it to come back.
What browser are you using?

@aviv926 commented on GitHub (Apr 8, 2024): I remember we had a problem like this and it was fixed Apparently there is something causing it to come back. What browser are you using?
Author
Owner

@Krolitian commented on GitHub (Apr 8, 2024):

What browser are you using?

Chrome

@Krolitian commented on GitHub (Apr 8, 2024): > What browser are you using? Chrome
Author
Owner

@nghduc97 commented on GitHub (Apr 28, 2024):

I remember we had a problem like this and it was fixed Apparently there is something causing it to come back. What browser are you using?

Probably came back from this fix https://github.com/immich-app/immich/pull/7669.

To fix this behavior though, a custom datetime input component must be implemented or imported from 3rd-party packages. The native HTML input only trigger change event when the whole datetime is complete, not when partially inputted.

@nghduc97 commented on GitHub (Apr 28, 2024): > I remember we had a problem like this and it was fixed Apparently there is something causing it to come back. What browser are you using? Probably came back from this fix https://github.com/immich-app/immich/pull/7669. To fix this behavior though, a custom datetime input component must be implemented or imported from 3rd-party packages. The native HTML input only trigger `change` event when the whole datetime is complete, not when partially inputted.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2758