BPKCalendar

@interface BPKCalendar : UIView

BPKCalendar is a subclass of FSCalendar configured with Skyscanner style properties.

  • Create a calendar with given minimum date and maximum date.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithMinDate:(nonnull BPKSimpleDate *)minDate
                                    maxDate:(nonnull BPKSimpleDate *)maxDate;

    Swift

    init!(minDate: BPKSimpleDate!, maxDate: BPKSimpleDate!)

    Parameters

    minDate

    The minimum date that can be selected in the calendar.

    maxDate

    The maximum date that can be selected in the calendar.

    Return Value

    A configured calendar.

  • Create a calendar with given minimum date and maximum date.

    See

    BPKCalendarTrafficLightConfiguration

    Declaration

    Objective-C

    - (nonnull instancetype)initWithMinDate:(nonnull BPKSimpleDate *)minDate
                                    maxDate:(nonnull BPKSimpleDate *)maxDate
                              configuration:
                                  (nonnull BPKCalendarConfiguration *)configuration;

    Swift

    init!(minDate: BPKSimpleDate!, maxDate: BPKSimpleDate!, configuration: BPKCalendarConfiguration!)

    Parameters

    minDate

    The minimum date that can be selected in the calendar.

    maxDate

    The maximum date that can be selected in the calendar.

    configuration

    The configuration to use. By default this will be BPKCalendarTrafficLightConfiguration

    Return Value

    A configured calendar.

  • Create a calendar with given configuration

    See

    BPKCalendarTrafficLightConfiguration

    Declaration

    Objective-C

    - (nonnull instancetype)initWithConfiguration:
        (nonnull BPKCalendarConfiguration *)configuration;

    Swift

    init!(configuration: BPKCalendarConfiguration!)

    Parameters

    configuration

    The configuration to use. By default this will be BPKCalendarTrafficLightConfiguration

    Return Value

    A configured calendar.

  • The calendar configuration.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nonnull) BPKCalendarConfiguration *configuration;

    Swift

    var configuration: BPKCalendarConfiguration { get }
  • The active calendar being used by the reciever.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nonnull) NSCalendar *gregorian;

    Swift

    var gregorian: UnsafeMutablePointer<Int32> { get }
  • Locale used for displaying name of days and months

    Declaration

    Objective-C

    @property (nonatomic, copy) NSLocale *_Nonnull locale;

    Swift

    var locale: UnsafeMutablePointer<Int32>! { get set }
  • Type of selection allowed

    Declaration

    Objective-C

    @property (nonatomic) BPKCalendarSelection selectionType;

    Swift

    var selectionType: Int32 { get set }
  • List of selected dates

    Declaration

    Objective-C

    @property (nonatomic, copy) NSArray<BPKSimpleDate *> *_Nonnull selectedDates;
  • The earliest date that the user is allowed to select

    Declaration

    Objective-C

    @property (nonatomic, strong) BPKSimpleDate *_Nonnull minDate;

    Swift

    var minDate: BPKSimpleDate! { get set }
  • The latest date that the user is able to see

    Declaration

    Objective-C

    @property (nonatomic, strong) BPKSimpleDate *_Nonnull maxDate;

    Swift

    var maxDate: BPKSimpleDate! { get set }
  • The underlying scrollView’s content offset

    Declaration

    Objective-C

    @property (nonatomic) CGPoint contentOffset;

    Swift

    var contentOffset: Int32 { get set }
  • The underlying scrollView’s content inset

    Declaration

    Objective-C

    @property (readonly) UIEdgeInsets contentInset;

    Swift

    var contentInset: Int32 { get }
  • The underlying scrollView’s content size

    Declaration

    Objective-C

    @property (readonly) CGSize contentSize;

    Swift

    var contentSize: Int32 { get }
  • The underlying scrollView’s isDecelerating

    Declaration

    Objective-C

    @property (readonly) BOOL isDecelerating;

    Swift

    var isDecelerating: Int32 { get }
  • The underlying scrollView’s isTracking

    Declaration

    Objective-C

    @property (readonly) BOOL isTracking;

    Swift

    var isTracking: Int32 { get }
  • The underlying scrollView’s isDragging

    Declaration

    Objective-C

    @property (readonly) BOOL isDragging;

    Swift

    var isDragging: Int32 { get }
  • The calendar’s delegate

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<BPKCalendarDelegate> delegate;

    Swift

    weak var delegate: BPKCalendarDelegate? { get set }
  • Reloads all dates displayed in the receiver.

    Declaration

    Objective-C

    - (void)reloadData;

    Swift

    func reloadData()
  • Refreshes the UI of every visible cell.

    Declaration

    Objective-C

    - (void)refreshDateAppearance;

    Swift

    func refreshDateAppearance()