Skip to content

2.0.0

Latest

Choose a tag to compare

@AmirShayegh AmirShayegh released this 05 Jul 07:14

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 with show(in:style:sourceView:) and DatePickerStyle (.automatic / .sheet / .popover / .center).
  • Customizable confirm button — set selectButtonTitle and selectButtonFont to 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 Extended dependency (inlined).
  • display(in:) / displayPopOver(on:in:) are deprecated — use show(in:style:).