Repository navigation
A major modernization of DatePicker, revived for current iOS.
Highlights
- Modern presentation — real bottom sheets (
UISheetPresentationController), fixed iPad popovers that now include the Select button, and a new centered-card style. Pick one withshow(in:style:sourceView:)andDatePickerStyle(.automatic/.sheet/.popover/.center). - Customizable confirm button — set
selectButtonTitleandselectButtonFontto localize or restyle it. - Locale-aware & DST-safe — the calendar grid respects the user's first day of the week, and date construction is time-zone / DST safe.
- Swift Package Manager support alongside CocoaPods.
Fixes
- Preserve the intended day across month scrolling (no more “the 31st → February → back as the 30th”).
- Fire the completion callback exactly once, including on programmatic dismissal.
- Include out-of-range selected years (e.g. a pre-2018 birthdate) instead of discarding them.
- Break retain cycles so the picker deallocates after dismissal.
- February 29 is reachable in yearless mode; crash-safe month/year navigation; re-centering on rotation.
Notes
- Minimum deployment target is now iOS 15.
- Dropped the external
Extendeddependency (inlined). display(in:)/displayPopOver(on:in:)are deprecated — useshow(in:style:).