CreationKit Documentation

Structure Date​Picker​Configuration

public struct DatePickerConfiguration  

A configuration object for setting up a DatePicker.



public init(startDate: Date = Date(), endDate: Date = Date.distantFuture,
              startAtDate: Date = Date(), previouslySelectedDate: Date? = nil,
              allowsMultipleSelection: Bool = false, useRangeSelection: Bool = false)  

Creates a config for a DatePicker


start​Date Date

The start boundary. Defaults to today. You can pass Data.distantPast or a specific date if you need to allow a user to select a date in the past.

end​Date Date

The end boundary. Defaults to the distant future.

start​AtDate Date

The date that the calendar should currently be viewing. This is useful if you want to allow selection of a previous date, but want to start the user at todays date. Defaults to today.

allows​Multiple​Selection Bool

If true, allow the user to select multiple dates. Defaults to false.

use​Range​Selection Bool

If true, allowsMultipleSelection must also be true. Allows the user to select a range of dates. Defaults to false.