added calendar

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2024-06-21 15:00:03 -05:00
parent 69ed21aa65
commit 1ba09ee366

View File

@ -29,7 +29,9 @@ class CheckboxViewController: BaseViewController<Checkbox> {
addFormRow(label: "Disabled", view: disabledSwitch)
addFormRow(label: "Surface", view: surfacePickerSelectorView)
addFormRow(label: "Error", view: showErrorSwitch)
addFormRow(label: "Calendar", view: VDS.DatePicker().with {
$0.calendarModel = .init(minDate: Date().startOfMonth, maxDate: Calendar.current.date(byAdding: .month, value: 2, to: Date())!)
})
showErrorSwitch.onChange = { [weak self] sender in
guard let self else { return }
self.component.showError = sender.isOn