title: How to create a datepicker to the bottom in SwiftUI?
body: <p>What I'm trying to approach is when user clicks on a button, a datepicker will show up at the bottom of screen. This is what I currently have but datepicker is taking the entire screen and shown as a popover. </p>
  
  <pre><code>VStack {
      Text("Birthdate").padding()
      Button(action: {
          self.showSheet = true
      }) {
          Text(startDate.toMediumString())
      }
      .sheet(isPresented: $showSheet){
          DatePicker("", selection: self.$startDate, in: ...Date(), displayedComponents: .date)
              .labelsHidden()
      }
  }
  </code></pre>
  
  <p>This is what I want to do.
  <a href="https://i.stack.imgur.com/AEZaK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AEZaK.png" alt="enter image description here"></a></p>
  
  <p>or this is even better if there's already a built in component I can use. </p>
  
  <p><a href="https://i.stack.imgur.com/uFySb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uFySb.png" alt="enter image description here"></a></p>