// // DatePicker-CalendarModel.swift // VDS // // Created by Matt Bruce on 5/14/24. // import Foundation import UIKit extension DatePicker { public struct CalendarModel { /// If set to true, the calendar will not have a border. public let hideContainerBorder: Bool /// If set to true, the calendar will not have current date indication. public let hideCurrentDateIndicator: Bool /// Enable specific days. Pass an array of string value in date format e.g. ['07/21/2024', '07/24/2024', 07/28/2024']. /// All other dates will be inactive. public let activeDates: [Date] /// Disable specific days. Pass an array of string value in date format e.g. ['07/21/2024', '07/24/2024', 07/28/2024']. /// All other dates will be active. public let inactiveDates: [Date] public let selectedDate: Date /// If provided, the calendar will allow a selection to be made from this date forward. Defaults to today. public let minDate: Date /// If provided, the calendar will allow a selection to be made up to this date. public let maxDate: Date /// Array of ``CalendarIndicatorModel`` you are wanting to show on legend. public let indicators: [CalendarBase.CalendarIndicatorModel] public init(hideContainerBorder: Bool = false, hideCurrentDateIndicator: Bool = false, activeDates: [Date] = [], inactiveDates: [Date] = [], selectedDate: Date = Date(), minDate: Date = Date(), maxDate: Date = Calendar.current.date(byAdding: .year, value: 10, to: Date())!, indicators: [CalendarBase.CalendarIndicatorModel] = []) { self.hideContainerBorder = hideContainerBorder self.hideCurrentDateIndicator = hideCurrentDateIndicator self.activeDates = activeDates self.inactiveDates = inactiveDates self.selectedDate = selectedDate self.minDate = minDate self.maxDate = maxDate self.indicators = indicators } } }