DurationPicker icon indicating copy to clipboard operation
DurationPicker copied to clipboard

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

Open sindresorhus opened this issue 11 months ago • 1 comments

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 https://github.com/mac-gallagher/DurationPicker/pull/5, but same should be the case with the UIKit version.

sindresorhus avatar Mar 03 '25 19:03 sindresorhus

I'm using https://github.com/mac-gallagher/DurationPicker/pull/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

mac-gallagher avatar Mar 04 '25 07:03 mac-gallagher