SwiftUI DatePicker Animation

Hi,
I am trying to animate a SwiftUI DatePicker in a form. This is my code:
Code Block swift
HStack {
          Text("Starts")
          Spacer()
          Text(DateHelper.ddMMMMyyyhmmaaFormatter.string(from: self.request.startDate))
            .foregroundColor(Color(UIColor.systemGray))
        }
        .onTapGesture {
          withAnimation {
            self.isStartPickerOpen.toggle()
            self.isEndPickerOpen = false
          }
        }
        if self.isStartPickerOpen {
          DatePicker("", selection: self.$request.startDate.onChange({_ in
            self.keepStartAndEndInTheSameDay()
            self.validateDateTimes()
          }))
          .datePickerStyle(WheelDatePickerStyle())
          .labelsHidden()
        }


When I tap on the text the DatePicker opens as expected. However when I close it, the DatePicker disappears by sliding into the bottom of the page, when it should slide back into the HStack above it.

Any ideas?

Please show more context. All such behaviors are affected by outer context.
Hi,
I wasn't able to add a video here. I've described my problem fully on StackOverflow: https://stackoverflow.com/questions/62570238/fix-odd-datepicker-animation-behaviour-in-swiftui-form
Thanks for showing the link. But the code shown in the link is completely different than the code of your opening post.

What is your main concern? Can you create a sample code to explain the issue and show us whole code?
SwiftUI DatePicker Animation
 
 
Q