Skip to content

feat(settings): add option to use 24hr clock (#112) - #116

Open
MIR-2004 wants to merge 1 commit into
Gsync:mainfrom
MIR-2004:feat/24hr-clock-option
Open

feat(settings): add option to use 24hr clock (#112)#116
MIR-2004 wants to merge 1 commit into
Gsync:mainfrom
MIR-2004:feat/24hr-clock-option

Conversation

@MIR-2004

@MIR-2004 MIR-2004 commented Sep 7, 2026

Copy link
Copy Markdown

Description

Closes #112

This PR adds an option in the Display Settings to toggle between a 12-hour (AM/PM) and 24-hour clock format. The selected setting is reflected across the entire application:

  • Display Settings: Added a Clock Format section (12-hour vs 24-hour options).
  • TimePicker: Supports 24-hour mode (00–23 hours, 00–59 minutes, hiding the AM/PM column) with 5-minute step shifting.
  • Activity Form & Table: Form initializes with default times matching the chosen format, and activity start/end times in the table render using the selected clock.
  • Validation: Updated AddActivityFormSchema and combineDateAndTime helper to parse and validate both 12h and 24h time strings.
  • Context: Added UserSettingsContext for reactive dashboard-wide updates upon saving settings.

Testing

  • Added unit tests for 12h and 24h mode in __tests__/TimePicker.spec.tsx and __tests__/clockFormat.spec.ts.
  • Ran full test suite (2575 tests passing).
  • Verified production build completes successfully (npm run build).

- add 12h/24h clock format toggle to display settings
- support 24-hour mode in TimePicker component
- update activity form schema and date-time utils to parse and validate both formats
- format activity tables and task timestamps according to user clock preference
- add UserSettingsContext provider and hooks for clock format state
- add unit tests for clock format utilities and TimePicker 24h mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request : Add an option to use 24hr clock

1 participant