fixed bug for seelcted date
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
6d0e334f73
commit
85adb2be69
@ -32,17 +32,12 @@ extension DatePicker {
|
|||||||
/// If provided, the calendar will allow a selection to be made up to this date.
|
/// If provided, the calendar will allow a selection to be made up to this date.
|
||||||
public let maxDate: Date
|
public let maxDate: Date
|
||||||
|
|
||||||
/// If provided, this is the date that will show as selected by the Calendar.
|
|
||||||
/// If no value is provided, the current date will be used. If null is provided, no date will be selected.
|
|
||||||
public let selectedDate: Date
|
|
||||||
|
|
||||||
/// Array of ``CalendarIndicatorModel`` you are wanting to show on legend.
|
/// Array of ``CalendarIndicatorModel`` you are wanting to show on legend.
|
||||||
public let indicators: [CalendarBase.CalendarIndicatorModel]
|
public let indicators: [CalendarBase.CalendarIndicatorModel]
|
||||||
|
|
||||||
public init(surface: Surface = .light,
|
public init(surface: Surface = .light,
|
||||||
hideContainerBorder: Bool = false,
|
hideContainerBorder: Bool = false,
|
||||||
hideCurrentDateIndicator: Bool = false,
|
hideCurrentDateIndicator: Bool = false,
|
||||||
selectedDate: Date = Date(),
|
|
||||||
activeDates: [Date] = [],
|
activeDates: [Date] = [],
|
||||||
inactiveDates: [Date] = [],
|
inactiveDates: [Date] = [],
|
||||||
minDate: Date = Date().startOfMonth,
|
minDate: Date = Date().startOfMonth,
|
||||||
@ -51,7 +46,6 @@ extension DatePicker {
|
|||||||
self.surface = surface
|
self.surface = surface
|
||||||
self.hideContainerBorder = hideContainerBorder
|
self.hideContainerBorder = hideContainerBorder
|
||||||
self.hideCurrentDateIndicator = hideCurrentDateIndicator
|
self.hideCurrentDateIndicator = hideCurrentDateIndicator
|
||||||
self.selectedDate = selectedDate
|
|
||||||
self.activeDates = activeDates
|
self.activeDates = activeDates
|
||||||
self.inactiveDates = inactiveDates
|
self.inactiveDates = inactiveDates
|
||||||
self.minDate = minDate
|
self.minDate = minDate
|
||||||
|
|||||||
@ -49,7 +49,7 @@ extension DatePicker {
|
|||||||
picker.indicators = calendarModel.indicators
|
picker.indicators = calendarModel.indicators
|
||||||
picker.activeDates = calendarModel.activeDates
|
picker.activeDates = calendarModel.activeDates
|
||||||
picker.inactiveDates = calendarModel.inactiveDates
|
picker.inactiveDates = calendarModel.inactiveDates
|
||||||
picker.selectedDate = calendarModel.selectedDate
|
picker.selectedDate = selectedDate
|
||||||
picker.minDate = calendarModel.minDate
|
picker.minDate = calendarModel.minDate
|
||||||
picker.maxDate = calendarModel.maxDate
|
picker.maxDate = calendarModel.maxDate
|
||||||
picker.pinToSuperView(.init(top: topPadding, left: padding, bottom: padding, right: padding))
|
picker.pinToSuperView(.init(top: topPadding, left: padding, bottom: padding, right: padding))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user