ios – How can I collapse/expand a datePicker() from compact to graphical, like the calendar app?


I’ve been trying to achieve the calendar select date UI however the default datePicker() is just a line with some sort of bubble that shows up to select a date and disappears once selected. this is what it looks like, I’ve been looking for answers all over stack overflow I found one very similar one, however the answers are too complicated with code that I don’t honestly understand.

this is my code snippet which is embedded in a list:

 Section(header: CustomText("Schedule Time")){
                            DatePicker("Select Date", selection: $wakeUp, in: Date()...)
                                .background(.white)
                                .cornerRadius(10)
                                .accentColor(.purple)

this is what I want if there’s anyone who knows a simplified way of achieving this interface please share, thank you.

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img