updated for isReadOnly

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2024-05-13 13:15:46 -05:00
parent 28d8161d09
commit 31b893042c

View File

@ -100,13 +100,14 @@ open class DatePicker: EntryFieldBase, DatePickerPopoverViewControllerDelegate,
// setting color config
selectedDateLabel.textColorConfiguration = primaryColorConfiguration.eraseToAnyColorable()
// setup the calendar
// tap gesture
fieldStackView
.publisher(for: UITapGestureRecognizer())
.sink { [weak self] _ in
self?.togglePicker()
guard let self else { return }
if self.isEnabled && !self.isReadOnly {
self.togglePicker()
}
}
.store(in: &subscribers)
}