DurationPicker icon indicating copy to clipboard operation
DurationPicker copied to clipboard

Feature Request: Ability to remove labels that are greater than maximum duration

Open GabRoyer opened this issue 1 year ago • 1 comments

Issue

When using DurationPicker in, for example, .minuteSecond mode with a maximumDuration of 180 , the minutes wheel shows numbers past 3 minutes, even though these would never ever be valid.

Proposed Solution

Add another setting, maybe .pruneLabels to optionally remove those excess labels.

Discussion

I really like the component you've built. I'd submit a PR myself, but I really don't know UIKit... That being said, I might contribute a PR for a SwiftUI wrapper very soon (Here it is #5 !).

GabRoyer avatar Feb 11 '25 23:02 GabRoyer

Thanks @GabRoyer, the initial implementation was just to match UIDatePicker as much as possible, but agree this would make a good addition! Will add this if I find the time, but also leaving it open for other contributors

mac-gallagher avatar Feb 22 '25 20:02 mac-gallagher