openstatusHQ / time-picker

A simple shadcn/ui TimePicker component
https://time.openstatus.dev
MIT License
653 stars 18 forks source link

feature: add a component to support 12-hour clocks #5

Closed agreen254 closed 8 months ago

agreen254 commented 9 months ago

Introduces a new component that supports 12-hour clocks. As I expanded on the already-present skeleton for this feature, it will need the shadcn Select component to work.

It will properly loop between 1 and 12, supports right-left arrow navigation, and will automatically update the time whenever the user switches between AM and PM.

The time is stored internally in the 24-hour format, but presented to the user in the 12-hour format.

https://github.com/openstatusHQ/time-picker/assets/101513222/0967cabd-3126-4280-b77a-17e5850b6e1d

vercel[bot] commented 9 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
time-picker ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 16, 2024 1:48pm
agreen254 commented 9 months ago

Updated to persist time in the datetime picker when user chooses a new day instead of resetting back to 00:00. This was causing an issue where the date could be stored internally as AM but user would read period select as PM.

mxkaske commented 9 months ago

Amazing @agreen254!

The deployment fails because of Component definition is missing display name react/display-name in the period-select.tsx component.

If I find time, I will fix it and merge your pr! Thanks for the work.

agreen254 commented 9 months ago

Thank you @mxkaske! Glad I could contribute!

guppy57 commented 8 months ago

Will this be merged in soon?

agreen254 commented 8 months ago

@mxkaske fixed the deployment issue!

mxkaske commented 8 months ago

Thanks @agreen254! 🔥