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.
|
||||
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.
|
||||
public let indicators: [CalendarBase.CalendarIndicatorModel]
|
||||
|
||||
public init(surface: Surface = .light,
|
||||
hideContainerBorder: Bool = false,
|
||||
hideCurrentDateIndicator: Bool = false,
|
||||
selectedDate: Date = Date(),
|
||||
activeDates: [Date] = [],
|
||||
inactiveDates: [Date] = [],
|
||||
minDate: Date = Date().startOfMonth,
|
||||
@ -51,7 +46,6 @@ extension DatePicker {
|
||||
self.surface = surface
|
||||
self.hideContainerBorder = hideContainerBorder
|
||||
self.hideCurrentDateIndicator = hideCurrentDateIndicator
|
||||
self.selectedDate = selectedDate
|
||||
self.activeDates = activeDates
|
||||
self.inactiveDates = inactiveDates
|
||||
self.minDate = minDate
|
||||
|
||||
@ -49,7 +49,7 @@ extension DatePicker {
|
||||
picker.indicators = calendarModel.indicators
|
||||
picker.activeDates = calendarModel.activeDates
|
||||
picker.inactiveDates = calendarModel.inactiveDates
|
||||
picker.selectedDate = calendarModel.selectedDate
|
||||
picker.selectedDate = selectedDate
|
||||
picker.minDate = calendarModel.minDate
|
||||
picker.maxDate = calendarModel.maxDate
|
||||
picker.pinToSuperView(.init(top: topPadding, left: padding, bottom: padding, right: padding))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user