| 1234567891011 |
- extension View {
- public func datePickerStyle(_ style: DatePickerStyle) -> some View {
- EnvironmentModifier(self) { environment in
- guard environment.supportedDatePickerStyles.contains(style) else {
- assertionFailure("Unsupported date picker style: \(style)")
- return environment.with(\.datePickerStyle, .automatic)
- }
- return environment.with(\.datePickerStyle, style)
- }
- }
- }
|