FUIDateRangePickerCollectionViewCell
@MainActor
open class FUIDateRangePickerCollectionViewCell : FUIInlineValidationDrawingCollectionViewCell<FUIDateRangePickerContentView>
A UICollectionViewCell subclass that allows a user to read or enter a value, using a calendar view.
And an onChangeHandler:
onChangeHandler: a handler closure that is invoked on changes to the value
Optionally, UITableViewController could provide:
dateFormatter: A developer-definedUIDateFormatterfor transposing betweenDatetype andString.
Example of usage in an application, UICollectionViewController:
var dateRange1: FUIDateRange? = FUIDateRange(startDate: Date(), duration: 1)
let dateFormatter = DateFormatter()
override func viewDidLoad() {
super.viewDidLoad()
dateFormatter.dateFormat = "dd-MM-yyyy"
self.collectionView.register(FUIDateRangePickerCollectionViewCell.self, forCellWithReuseIdentifier: FUIDateRangePickerCollectionViewCell.reuseIdentifier)
// ...
}
override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: FUIDateRangePickerCollectionViewCell.reuseIdentifier, for: indexPath) as! FUIDateRangePickerCollectionViewCell
cell.title.text = "Customized Date Formatter"
cell.dateFormatter = dateFormatter
cell.value = dateRange1
// MARK: implement onChangeHandler
cell.onChangeHandler = { [unowned self] newValue in
self.dateRange1 = newValue
}
return cell
}
Theming
Supported TEXT class paths:
fdlFUIDateRangePickerCollectionViewCell_title {}
fdlFUIDateRangePickerCollectionViewCell_mandatoryIndicator {}
fdlFUIDateRangePickerCollectionViewCell_valueText {}
Supported TEXT properties:
font-color: Color;
font-style: UIFontTextStyle;
Supported TINTABLE class paths:
fdlFUIDateRangePickerCollectionViewCell_valueText {}
Supported TINTABLE properties:
font-color { -selected }: Color;
font-style { -selected }: UIFontTextStyle;
-
The value of the property.
Declaration
Swift
@MainActor public var value: FUIDateRange? { get } -
Indicates if the value of the cell could be changed or not. The default is true.
Declaration
Swift
@MainActor open var isEditable: Bool { get set } -
Indicate whether the slider is enabled.
isEnabledandisEditableare in sync.Declaration
Swift
@MainActor open override var isEnabled: Bool { get set } -
Indicates whether the cell is a mandatory field.
The default value is
false.Declaration
Swift
@MainActor open var isRequired: Bool { get set } -
Indicates that the cell is a mandatory field.
The default value is
*.Declaration
Swift
@MainActor public var mandatoryIndicator: FUIText { get set } -
The
DateFormatterto be used to display the selectedDateRange. Default date formatter conforms system setting.Declaration
Swift
@MainActor open var dateFormatter: DateFormatter? { get set } -
The start date of the calendar. Default is current year’s first day.
Declaration
Swift
@MainActor open var minimumDate: Date? { get set } -
The end date of the calendar. Default is next year’s last day.
Declaration
Swift
@MainActor open var maximumDate: Date? { get set } -
The ID of the language to be used when displaying the
FUICalendarView.The default value for this property is ‘nil’. The current device language will be used if this property is ‘nil’ or if the language ID is not supported by SAPFiori.
Declaration
Swift
@MainActor public var customLanguageID: String? { get set } -
Undocumented
Declaration
Swift
@MainActor open override var accessibilityLabel: String? { get set }