예약 업로드 추가
This commit is contained in:
53
SodaLive/Sources/Content/Create/SelectDatePicker.swift
Normal file
53
SodaLive/Sources/Content/Create/SelectDatePicker.swift
Normal file
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// SelectDatePicker.swift
|
||||
// SodaLive
|
||||
//
|
||||
// Created by klaus on 2024/01/10.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct SelectDatePicker: View {
|
||||
|
||||
@Binding var selectedDate: Date
|
||||
@Binding var isShowing: Bool
|
||||
|
||||
var body: some View {
|
||||
GeometryReader { proxy in
|
||||
ZStack {
|
||||
Color
|
||||
.black
|
||||
.opacity(0.5)
|
||||
.edgesIgnoringSafeArea(.all)
|
||||
|
||||
VStack(spacing: 0) {
|
||||
DatePicker("", selection: $selectedDate, in: Date()..., displayedComponents: .date)
|
||||
.datePickerStyle(WheelDatePickerStyle())
|
||||
.labelsHidden()
|
||||
.environment(\.locale, Locale.init(identifier: "ko"))
|
||||
.frame(width: proxy.size.width)
|
||||
|
||||
Button(action: { self.isShowing = false }) {
|
||||
Text("확인")
|
||||
.font(.system(size: 16))
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.padding(.vertical, 10)
|
||||
.frame(width: proxy.size.width - 53.4)
|
||||
}
|
||||
}
|
||||
.background(Color(hex: "222222"))
|
||||
.cornerRadius(6.7)
|
||||
}
|
||||
.frame(width: proxy.size.width)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct SelectDatePicker_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
SelectDatePicker(
|
||||
selectedDate: .constant(Date()),
|
||||
isShowing: .constant(true)
|
||||
)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user