mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-16 15:23:29 +00:00
fix(ui): own the time picker so it follows the 24-hour preference
The native datetime-local / time picker renders its clock and AM/PM toggle by the browser UI language, not the page lang or the app's time-format preference — so an English-language browser showed AM/PM even with 24-hour selected. Replace the native time control with an app-controlled TimeField (text entry + a dependency-free popover of hour/minute, plus AM/PM in 12-hour mode) whose hour cycle always tracks the preference. DateTimeField now composes the native calendar (date) with TimeField (time); the committed value stays a local yyyy-MM-ddTHH:mm string, and min/max clamp the recombined value. Also thread the time-format preference into the doctor-report PDF so its generated-at timestamp honours it instead of the locale default.
This commit is contained in:
1 parent
426b21497a
commit
7e901e674a
19 files changed
+826
-243
No files matched your search
@@ -75,6 +75,9 @@ function isMaskPlaceholder(words: string[]): boolean {
|
||||
* reason. Prune an entry only when the value genuinely diverges in a locale.
|
||||
*/
|
||||
const LEGIT_IDENTICAL = new Set<string>([
|
||||
// The AM/PM marker label — the affix abbreviations themselves are the same
|
||||
// 12-hour-clock notation across the shipped Latin-script locales.
|
||||
"common.period",
|
||||
// Clinical abbreviations / SI units — identical across locales.
|
||||
"charts.vo2Max",
|
||||
"cycle.insights.crosstab.unitGlucose",
|
||||
|
||||
Reference in new issue
Block a user