vds_ios/VDS/Components/DatePicker/DatePickerCalendarModel.swift
Matt Bruce 2b60e8cff3 CXTDT-581803 - Date Picker - Calendar does not switch to Dark Mode
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
2024-07-03 12:19:30 -05:00

53 lines
2.0 KiB
Swift

//
// 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]
/// 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] = [],
minDate: Date = Date().startOfMonth,
maxDate: Date = Date().endOfMonth,
indicators: [CalendarBase.CalendarIndicatorModel] = []) {
self.hideContainerBorder = hideContainerBorder
self.hideCurrentDateIndicator = hideCurrentDateIndicator
self.activeDates = activeDates
self.inactiveDates = inactiveDates
self.minDate = minDate
self.maxDate = maxDate
self.indicators = indicators
}
}
}