All Questions
Tagged with datepicker swift
295
questions
1
vote
1
answer
62
views
Change label Color on Date Picker Swift UI
So I want to change my Date picker (WheelDatePickerStyle) label color, currently default is green i want to change to yellow already tried several properties like accentColor but didnt work.
Thanks
...
0
votes
0
answers
86
views
Enable the user to pick a date from Calender for non consecutive date only in ios?
I am new to the calendar. I have an array of dates which is non-consecutive. I want to select and highlight it initially. And, the unhighlighted has to be non-clickable, i.e. the user is only able to ...
1
vote
0
answers
97
views
DatePicker not updating the state when scrolling to 12 hours later/earlier
I am using SwiftUI DatePicker in my app. I have created a selectedTime state variable that is passed to the DatePicker. I am also using a Text component to display the selected time. As such, this ...
1
vote
1
answer
208
views
Is there any way to select entire week in MultiDatePicker?
I'm working on a SwiftUI project where I need to implement a feature using MultiDatePicker that allows a user to select an entire week by tapping on a single date within that week. Once a date is ...
0
votes
1
answer
271
views
How to detect SwiftUI DatePicker date selection dismissal?
I am looking for a way to detect, when a user touches outside DatePicker when selecting a date and with this makes the date picker to close.
@State private var date = Date()
@State private var ...
1
vote
0
answers
81
views
Bug in DatePicker in SwiftUI
There's a strange behavior with DatePicker when its style is set to .compact. I think this is a bug from Apple, but not 100% sure. Maybe someone already faced it and has an idea of a solution.
What is ...
0
votes
1
answer
236
views
Show DatePicker as popup instead of having it show inline [duplicate]
Right now, I have DatePicker set up in my SwiftUI code to just always show inline with the rest of the UI:
DatePicker(
"",
selection: $selectedDate,
displayedComponents: .date
)
....
0
votes
1
answer
324
views
How to know if Inline Date picker is switch between Yearly and Weekly view in iOS using swift?
I am using UIDatePicker with inline style. A month-year action appears at top left. I want to know if this action is being clicked of Month-Year wheel is appears on the screen.
Basically i want to ...
1
vote
1
answer
254
views
Aligning a date picker within a grid
I have a SwiftUI view that presents a number of GridRows in a Grid. Each row has 2 columns, the left column is aligned right, and the right column is aligned left. Each row contains a title (left ...
1
vote
1
answer
319
views
DatePicker in SwiftUI — how to change highlight colour of month and year?
With DatePicker in SwiftUI, how can I change the highlight (and text) colour of the month and year? I tried changing the accent colour (as you see here it's red) but this doesn't change the month and ...
0
votes
1
answer
1k
views
Convert Date to String in IOS Swiftui
Date Picker :
DatePicker(selection: $vm.user.movingdate,
displayedComponents: [.date]) {
Label("Select a date", systemImage: "calendar")
}
when i print the selected ...
1
vote
1
answer
852
views
How can I efficiently update SwiftUI DatePicker to not allow future times, but always allow the current time?
I have a SwiftUI View that contains a DatePicker with .datePickerStyle(.wheel). I want the user to be able to select dates and times in the past up to the current time, but no dates or times in the ...
0
votes
1
answer
63
views
keyboard show when selected time tapped long in datePicker(iPad)
In Swift, keyboard show when selected time(center time) tapped long in datePicker in UITableView Cell.
I want to hide keyboard on long tap, so please tell me how to write
the problem is below
Problem ...
7
votes
2
answers
2k
views
SwiftUI Datepicker changes size when first time choosing a date
I have a date picker inside a bottom sheet view.
When the bottom sheet opens, the first time I choose a day, the date picker height changes.
P.S: If I set a custom height for the picker using .frame, ...
1
vote
1
answer
2k
views
How to implement the 'datepicker' correctly using swift when adding the multiple entries to server?
**Aim: ** To show latest apple calendar type of date picker(inline) in app when user wants to select the date.How it should look
Scenario:**
The user can input multiple entries (maximum 3) the ...