Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
111 views

I got a Button and DatePicker in a HStack. The button toggles the visibility of the picker. When the DatePicker is visible, the button label is set to .iconOnly. When the DatePicker is hidden, the ...
0x1801ce's user avatar
  • 790
1 vote
2 answers
477 views

while building my app i encountered an issue that when i embed a DatePicker inside VStack and implement a onTapGesture on VStack then the DatePicker won't open calendar to pick dates on click. VStack(...
ADITYA RAJ's user avatar
0 votes
0 answers
91 views

I am using SwiftUI Date Picker (iOS 16.2), however, after selecting a date, if try moving to select a different date, it keeps scrolling back to the date currently selected. struct DatePickerExample: ...
r360's user avatar
  • 71
1 vote
0 answers
218 views

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 ...
Jeyhun Zakaryayev's user avatar
1 vote
1 answer
1k views

I have added date picker in my application screen where need to designed using SwiftUI but not able to customize it at all, i want to set its leading, trailing and also want to add color in background ...
Urvashi Singh's user avatar
2 votes
1 answer
529 views

I'm trying to put a DatePicker() in a .confirmationDialog, but it's not displaying. My overall goal is to try and replicate the Journal app (in iOS 17.2 beta), so I need this look at least. I'm ...
oosh's user avatar
  • 321
1 vote
1 answer
226 views

I've implemented the following code for my TabView and a DatePicker. I can currently slide between the three pages. And I can use the DatePicker to select between the 3 permitted days import SwiftUI ...
99natmar99's user avatar
1 vote
2 answers
540 views

I have a form which lets the user create a project. In this form, I want to automatically change the project's deadline DatePicker based on the user's input such as start date, daily count, and target ...
Michael Hsieh's user avatar
0 votes
0 answers
108 views

I'm getting 200 lines of AutoLayout errors in the console from SwiftUI's DatePicker. Looks like something to do with the label. In testing, this is happening in a blank project with nothing else in ...
JBZic's user avatar
  • 83
1 vote
1 answer
473 views

On iOS 15, if you display a List of VStacks with a Text and DatePicker as below @main struct WeirdListDatePickerProblem: App { var body: some Scene { WindowGroup { ContentView()...
mmm111mmm's user avatar
  • 4,215
0 votes
1 answer
222 views

Hello, I would like to take some advice on my requirement. I have a parent view which has a child view and that has one more child view. Basically, I would like to pass the binded value to the parent ...
DILIP KOSURI's user avatar
0 votes
0 answers
122 views

I'm trying to create a View to allow me to tap a back arrow to go back a day, tap a forward arrow to go forward a day, and tap a date picker to select a specific date more quickly. The UI looks like ...
Jr795's user avatar
  • 799
2 votes
0 answers
581 views

Hi I have a UIDatePicker with inline style and dateAndTime mode as InputView to a UITextField, and when datePicker appears its not showing the days and the time. Please refer the image1(when it ...
Hilaj S L's user avatar
  • 2,046
0 votes
1 answer
1k views

I need to show two dates as showing in the screenshot fromDate & toDate. I'm getting some UI issue after selecting date from first component showing date on screen Jul 1, 2021 but after selecting ...
Jessy's user avatar
  • 167
0 votes
1 answer
45 views

here is my code. extension ProfileViewController { private func openDatePicker() { let datePicker = UIDatePicker() datePicker.datePickerMode = .date ageTextFieldOutlet....
Chandan's user avatar
  • 369
3 votes
1 answer
1k views

How can I fix the reason why the warning appears? struct ContentView: View { @State private var selectedDate: Date = Date() var body: some View { Form { DatePicker("...
Isaak's user avatar
  • 1,379
1 vote
0 answers
1k views

I've implemented a DatePicker with SwiftUI. It works for the most part as is should, but when selecting a specific date, e.g 26. Nov 2019, it changes the format of the displayed date text. Exampels: ...
Daniel's user avatar
  • 50
0 votes
1 answer
2k views

I have a DatePicker such as: DatePicker("DATE & TIME", selection: Binding(get: { self.dateTime }, set: { newValue in self.dateTime = newValue if newValue > Date() { ...
Brendon's user avatar
  • 693
0 votes
1 answer
2k views

I have a form where the user should pick a date, and write a sum. It works fine, but when i display the information (form core data) in a List the whole date string is shown (time zone, time, year etc)...
ulrik's user avatar
  • 11
1 vote
1 answer
79 views

I have a DatePicker on my app and the user can't select a past date, because I'm creating a notification out of it How can I implement a minimumDate equivalent in SwiftUI? I tried creating an alert on ...
fabiofiorita's user avatar
0 votes
2 answers
2k views

In my project i want to apply condition like, user can select date only 3months from current date. I.e i want to display a date picker containing Month and Day with range of 90 days. Eg. November is ...
user avatar
6 votes
2 answers
2k views

I have a SwiftUI Form with a Section that contains a DatePicker. The DatePicker is set to have a datePickerStyle of CompactDatePickerStyle(), by default, since it's in a Form. When tapping on the ...
Nick Kohrn's user avatar
  • 6,099