Skip to content

Instantly share code, notes, and snippets.

@glenngijsberts
Created February 16, 2025 17:10
Show Gist options
  • Select an option

  • Save glenngijsberts/b8cc1c3dee67fc83f5c581a4e51d91a2 to your computer and use it in GitHub Desktop.

Select an option

Save glenngijsberts/b8cc1c3dee67fc83f5c581a4e51d91a2 to your computer and use it in GitHub Desktop.
SwiftUI DatePicker Color
import SwiftUI
private struct DatepickerColor: ViewModifier {
let color: Color
func body(content: Content) -> some View {
content
.colorScheme(.dark)
.colorMultiply(color)
}
}
public extension DatePicker {
func datepickerColor(_ color: Color) -> some View {
self.modifier(DatepickerColor(color: color))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment