Skip to content

[Fix/#3] Correct initial hour selection and include 0 in 24-hour TimePicker#4

Merged
DongChyeon merged 1 commit intomainfrom
bugfix/#3-24hour-picker-initial-hour-and-zero
Jul 2, 2025
Merged

[Fix/#3] Correct initial hour selection and include 0 in 24-hour TimePicker#4
DongChyeon merged 1 commit intomainfrom
bugfix/#3-24hour-picker-initial-hour-and-zero

Conversation

@DongChyeon
Copy link
Owner

🎯 Related Issue


📝 Description

What does this PR do?

Change 24 Hour TimePicker hour range to include 0, which naturally fixes incorrect initial hour selection.


✅ Changes

  • Update hourItems in 24-hour TimePicker from (1..23) to (0..23).
  • Initial hour selection now works correctly without additional calculation changes.

🔍 Screenshots / Test Results (if applicable)

N/A


👤 Reviewer Checklist

N/A

@DongChyeon DongChyeon requested a review from Copilot July 2, 2025 08:15
@DongChyeon DongChyeon self-assigned this Jul 2, 2025
@DongChyeon DongChyeon added the bug Something isn't working label Jul 2, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adjusts the 24-hour TimePicker to include 0 in its selectable hours, which also corrects the initial hour selection logic.

  • Expanded hourItems range from 1..23 to 0..23.
  • No other calculation changes needed to fix initial selection.
Comments suppressed due to low confidence (1)

timepicker/src/main/java/com/dongchyeon/timepicker/TimePicker.kt:257

  • Add a unit or UI test to verify that hourItems includes 0 and that the initial selected hour is correctly set to the first item (0) when using the 24-hour picker.
    val hourItems = remember { (0..23).toList() }

@DongChyeon DongChyeon merged commit 85d20f7 into main Jul 2, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐞 Bug - 24 Hour TimePicker displays wrong initial hour and excludes 0

1 participant

Comments