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

Help: 12 Hours clock with AM/PM support #7

Closed
AnnieNinaJoyceV opened this issue Jan 11, 2017 · 5 comments
Closed

Help: 12 Hours clock with AM/PM support #7

AnnieNinaJoyceV opened this issue Jan 11, 2017 · 5 comments
Assignees

Comments

@AnnieNinaJoyceV
Copy link

Hello @HamzaGhazouani,

Thank you for sharing your work.
I am using this control in an app. The feature requires to show 12 hours clock (like regular wall clock) but the user can opt AM/PM. Like user can choose to sleep from 10 PM to 6 AM or 10 AM to 6 PM.

Can you please give me an insight n how to do this?
Your help is very much appreciated. TIA :)

@HamzaGhazouani
Copy link
Owner

Hello @AnnieNinaJoyceV,
Do you look for something like iOS native alarm? (Like the first example in the sample code but using 12 hours instead 24h, right?)
If you could share a screenshot of what you need, it will be perfect :)

@AnnieNinaJoyceV
Copy link
Author

AnnieNinaJoyceV commented Jan 12, 2017

@HamzaGhazouani Yes, I want it to work exactly like the iOS 10 Bedtime. Is it possible?

time

Here is a basic sample image. If I have the numbers included, in 12 hours (maximum value set to 12 * 60 * 60), the slider matches its position with the number. When I change it to 24 hours, the whole circle is divided to occupy 24 hours equally. Instead, I want it to have two 12 hours rotation.

Unlike the bedtime clock, I want the Digits to be lined outside the circle.

@HamzaGhazouani
Copy link
Owner

HamzaGhazouani commented Feb 17, 2017

@AnnieNinaJoyceV Sorry for my late response.
To do that we need to have the number of rounds to reach the maximum value.
minValue: 0, maxValue: 24, and the number of round should be 2
the first round we will reach 12am, the second one it will be midnight.

Please checkout this fork it works perfectly: https://github.com/amichnia/HGCircularSlider
And I will integrate this feature soon.

@AnnieNinaJoyceV
Copy link
Author

@HamzaGhazouani Thanks, I will check this out!

@HamzaGhazouani
Copy link
Owner

Fixed in #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants