directus/directus

Decimal type input field shows wrong decimal point seperator (,) instead of (.)

Open

#24,803 opened on 2025年3月9日

GitHub で見る
 (9 comments) (0 reactions) (0 assignees)TypeScript (25,193 stars) (3,505 forks)batch import
BugGood First IssueLow ImpactLow ReachStudio

説明

Describe the Bug

Decimal type input field shows wrong decimal point seperator (,) instead of (.)

I'm using MySQL as db, which supports Decimal. I'm in Belgium. My system's locale is set to Belgium nl-BE, my OS version is set to English Locally we format numbers like this: 300,44 instead of 300.44

Yet, I'm working on a financial application that should format numbers like in the US (300.44)

I've created an input field with type 'Decimal', set precision & scale When I enter a value (United States) like 300.44, the value is saved correctly in db: 300.44 When I try to edit the entry, and it has to pre-fill the value in the input field, the formatting is off: 300,44

  • The API returns the correct value: 300.44
  • Overview lists show the correct value: 300.44

I've checked my browser locale, it is set to en-US I've checked the browser headers, also en-US My admin profile, used to edit the values, is explicitly set to "English (United States)" The project settings default language setting is also set to "English (United States)" All these changes were set before creating the field

To Reproduce

  • Set computer date & number formatting to Belgium
  • Set system language default to English (United States)
  • Create a decimal field
  • Enter a number en-us formatted: 300.44
  • Save the entry
  • Edit the entry
  • Value in the field should show 300,44

Profile & project setting locale has no effect

Directus Version

v11.5.1

Hosting Strategy

Self-Hosted (Docker Image)

Database

MySQL v8

コントリビューターガイド