NACC_PickerPopoverContent

@MainActor
struct NACC_PickerPopoverContent : View

This is a view that we use to allow the user to select a new cleandate.

It shows a standard “graphical” date picker (calendar-style), along with a “DONE” button (dismisses the modal).

It shows a a “Today” button (sets the calendar to today), if the selected day is not today.

If the user has changed the date since invoking the screen, a “Reset” button also appears, allowing the user to discard any changes.

  • This is how much padding is given the top title (on iPhone).

    Declaration

    Swift

    @MainActor
    private static let _cleandatePickerTitlePaddingInDisplayUnits: CGFloat
  • The spacing to use for VStacks

    Declaration

    Swift

    @MainActor
    private static let _verticalSpacingInDisplayUnits: CGFloat
  • The spacing to use for the horizontal axis

    Declaration

    Swift

    @MainActor
    private static let _horizontalSpacingInDisplayUnits: CGFloat
  • The minimum width, for popovers.

    Declaration

    Swift

    @MainActor
    private static let _miniumHorizontalWidthInDisplayUnits: CGFloat
  • This will have the original date, from when the screen was opened.

    Declaration

    Swift

    @MainActor
    private static var _originalDate: Date?
  • We can’t start before NA was founded.

    Declaration

    Swift

    @MainActor
    private static let _minimumDate: Date?
  • This allows us to dismiss the popover/sheet.

    Declaration

    Swift

    @Environment
    @MainActor
    private var _dismiss: DismissAction { get }
  • Binds to the main cleandate storage.

    Declaration

    Swift

    @Binding
    @MainActor
    var selectedDate: Date { get nonmutating set }
  • Set to true, if the screen is being presented in a popover.

    Declaration

    Swift

    @State
    @MainActor
    var isInPopover: Bool { get nonmutating set }
  • This returns the whole DatePicker screen.

    Declaration

    Swift

    @MainActor
    var body: some View { get }