Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for 24-Hour Time Format in DayScheduleListWidget #45

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

yagizdo
Copy link

@yagizdo yagizdo commented Feb 19, 2024

This PR introduces the ability to display times in a 24-hour format within the DayScheduleListWidget. The addition of a boolean is24Hours parameter allows users to specify whether they want to display time in a 24-hour format or stick with the default 12-hour format with AM/PM indicators. This feature enhances the flexibility of the widget to cater to different regional preferences for time display.

Changes:

  • Added is24Hours parameter to DayScheduleListWidget and related classes.
  • Updated populateValidTimesList method in DayScheduleListWidgetMixin to conditionally generate time slots based on the 24-hour format when is24Hours is true.
  • Adjusted the widget and mixin to utilize the is24Hours flag for determining the time format to display.

To-Do:

  • Remove AM/PM indicators when is24Hours is set to true, ensuring a pure 24-hour time format is displayed.

This update ensures that the DayScheduleListWidget can be easily configured to match the time format preference of its users, improving its usability across different locales. The todo item highlights an ongoing enhancement to fully adapt the widget for 24-hour time display without AM/PM indicators, further aligning with user expectations in regions that predominantly use the 24-hour clock.

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.

1 participant