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

Setting minimumDuration to 10 seconds while showing .hourMinute does not respect minimum #7

Open
sindresorhus opened this issue Mar 3, 2025 · 1 comment

Comments

@sindresorhus
Copy link

sindresorhus commented Mar 3, 2025

Basically:

DurationPickerView(
	$duration,
	components: .hourMinute,
	minumumDuration: 10
)

Results in:

Image

But I don't think it should allow 0 min here. Same for .hour and all the modes that do not show seconds.

Also the same problem if we specify .hour and minimum as 10 minutes:

DurationPickerView(
	$duration,
	components: .hour,
	minumumDuration: 600
)

I'm using #5, but same should be the case with the UIKit version.

@mac-gallagher
Copy link
Owner

I'm using #5, but same should be the case with the UIKit version.

Can you please confirm this? It should be covered by unit tests.

I can't speak for the SwiftUI version since that change is still in progress and not included in the main branch

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

No branches or pull requests

2 participants