diff --git a/VDSSample/ViewControllers/DatePickerViewController.swift b/VDSSample/ViewControllers/DatePickerViewController.swift index b3c8303..76a2170 100644 --- a/VDSSample/ViewControllers/DatePickerViewController.swift +++ b/VDSSample/ViewControllers/DatePickerViewController.swift @@ -93,6 +93,18 @@ class DatePickerViewController: BaseViewController { addFormRow(label: "ToolTip Title", view: tooltipTitleTextField) addFormRow(label: "ToolTip Content", view: tooltipContentTextField) append(section: getCalendarSection()) + append(section: .init().with({ + func datePicker() -> VDS.DatePicker { + VDS.DatePicker().with { + $0.calendarModel = .init(minDate: Date().startOfMonth, maxDate: Calendar.current.date(byAdding: .month, value: 2, to: Date())!) + } + } + $0.title = "UI Testing" + $0.addFormRow(label: "Below Test", view: datePicker()) + $0.addFormRow(label: "", view: View().with{$0.width(20);$0.height(400)}) + $0.addFormRow(label: "Above Test", view: datePicker()) + })) + disabledSwitch.onChange = { [weak self] sender in self?.component.isEnabled = !sender.isOn } @@ -154,7 +166,6 @@ class DatePickerViewController: BaseViewController { .sink { [weak self] text in self?.updateTooltip() }.store(in: &subscribers) - } func setupModel() { @@ -227,8 +238,7 @@ extension DatePickerViewController { section.addFormRow(label: "Indicator One Date", view: indicatorOnePicker) section.addFormRow(label: "Indicator Two Date", view: indicatorTwoPicker) section.addFormRow(label: "Indicator Three Date", view: indicatorThreePicker) - - + containerBorderSwitch.onChange = { [weak self] sender in self?.updateCalendarModel() }