Add settings to enable 24-hour time format and customizable date format
Description
Based on #1739 and #2344 Options for configuring date and time formats have long been requested (see #60 and duplicates). This PR aims to add this functionality.
This PR adds:
- A "Date & Time" subsection in General settings
- A toggle that allows the user to switch between 12-hour and 24-hour time formats
- A dropdown/text input field to let the user select a date format
As requested in #60.
In addition to the current D MMM YYYY format the following options are added: DD/MM/YYYY, MM/DD/YYYY, YYYY/MM/DD, Custom - where the user can enter a 16-character dayjs format string.
Example image:
Fixes #60
Type of change
- [o] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing functionality to not work as expected) (new function params)
- [o] This change requires a documentation update
Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
Could this get reviewed @ajbura ?
Preview: https://2347--pr-cinny.netlify.app ⚠️ Exercise caution. Use test accounts. ⚠️
I've now added a hint for the formatting. I would've preferred to prevent overflow using flexFlow: 'column wrap' or something similar, but the current method works. I've also added 24hr functionality to the TimePicker.