/sambag

Android Time, Month-Year, and Date pickers implemented in Swift for iOS development

Primary LanguageSwiftMIT LicenseMIT

Sambag

Android Time, Month-Year, and Date pickers implemented in Swift for iOS development

Date Picker

Specifying min and max date

let vc = SambagDatePickerViewController()
var limit = SambagSelectionLimit()
limit.selectedDate = Date()
let calendar = Calendar.current
limit.minDate = calendar.date(
    byAdding: .year,
    value: -50,
    to: limit.selectedDate,
    wrappingComponents: false
)
limit.maxDate = calendar.date(
    byAdding: .year,
    value: 50,
    to: limit.selectedDate,
    wrappingComponents: false
)
vc.limit = limit

Showing day of week

let vc = SambagDatePickerViewController()
vc.hasDayOfWeek = true 

Hiding day of week

let vc = SambagDatePickerViewController()
vc.hasDayOfWeek = false 

Screenshots

Time Picker

Theme_Dark Theme_Light

Month Year Picker

Month_Year_Dark Month_Year_Light

Date Picker

Date_Dark Date_Light