-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exposed doneButton enabled variable and added option to avoid auto-selection of day when releasing scrolling #112
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,12 @@ public protocol DateTimePickerDelegate: AnyObject { | |
|
||
@objc public class DateTimePicker: UIView { | ||
|
||
public var doneButtonIsEnabled: Bool = true { | ||
didSet { | ||
doneButton.isEnabled = doneButtonIsEnabled | ||
} | ||
} | ||
|
||
var contentHeight: CGFloat = 330 | ||
|
||
public struct CustomFontSetting { | ||
|
@@ -260,6 +266,9 @@ public protocol DateTimePickerDelegate: AnyObject { | |
timeZone = calendar.timeZone | ||
} | ||
} | ||
|
||
public var autoSelectDayOnStopScroll: Bool = true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not quite fond of this feature, as although someone requested it I find it looks buggy and not what I intended for the library. I think it's fine if someone wants it for their app, they can maybe tweak it to their need; but I'd prefer to leave it off the library for now. WDYT? |
||
|
||
public var hapticFeedbackEnabled: Bool = true | ||
|
||
public var completionHandler: ((Date)->Void)? | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nits:
func enableDoneButton(_ enabled: Bool)
.