Skip to content
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

Add support for yearAndMonth mode #88

Open
oliveryasuna opened this issue Sep 2, 2024 · 1 comment
Open

Add support for yearAndMonth mode #88

oliveryasuna opened this issue Sep 2, 2024 · 1 comment

Comments

@oliveryasuna
Copy link

oliveryasuna commented Sep 2, 2024

iOS now supports a year/month picker natively.

if #available(iOS 17.4, *) {
    picker.datePickerMode = .yearAndMonth
} else {
    picker.datePickerMode = .date
    // Technically, iOS did support it, but it had to be set like this.
    picker.datePickerMode = .init(rawValue: 4269) ?? .date
}

if #available(iOS 13.4, *) {
    picker.preferredDatePickerStyle = .wheels
}
@oliveryasuna
Copy link
Author

I opened a PR for this: #89

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant