CreationKit Documentation

Structure Cell​State

public struct CellState  

Describes which month the cell belongs to

  • ThisMonth: Cell belongs to the current month

  • PreviousMonthWithinBoundary: Cell belongs to the previous month. Previous month is included in the date boundary you have set in your delegate - PreviousMonthOutsideBoundary: Cell belongs to the previous month. Previous month is not included in the date boundary you have set in your delegate - FollowingMonthWithinBoundary: Cell belongs to the following month. Following month is included in the date boundary you have set in your delegate - FollowingMonthOutsideBoundary: Cell belongs to the following month. Following month is not included in the date boundary you have set in your delegate You can use these cell states to configure how you want your date cells to look. Eg. you can have the colors belonging to the month be in color black, while the colors of previous months be in color gray.

Properties

is​Selected

public let isSelected: Bool

returns true if a cell is selected

text

public let text: String

returns the date as a string

date​Belongs​To

public let dateBelongsTo: DateOwner

returns the a description of which month owns the date

date

public let date: Date

returns the date

day

public let day: DaysOfWeek

returns the day

row

public let row: () -> Int

returns the row in which the date cell appears visually

column

public let column: () -> Int

returns the column in which the date cell appears visually

date​Section

public let dateSection: () -> (range: (start: Date, end: Date), month: Int, rowCount: Int) 

returns the section the date cell belongs to

selected​Position

public let selectedPosition: () -> SelectionRangePosition

returns the position of a selection in the event you wish to do range selection

cell

public var cell: () -> JTACDayCell? 

returns the cell. Useful if you wish to display something at the cell's frame/position

selection​Type

public var selectionType: SelectionType? = nil

Shows if a cell's selection/deselection was done either programatically or by the user This variable is guranteed to be non-nil inside of a didSelect/didDeselect function