title: SwiftUI Horizontal Sections Forms
body: <p>I'm trying to rebuild this in SwiftUI</p>
  
  <p><a href="https://i.stack.imgur.com/VWTt2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VWTt2.png" alt="enter image description here"></a></p>
  
  <p>So I'm a beginner in SwiftUI and thought I could create a Form with 2 Sections in a HStack which header is "Passengers" with a Stepper another section which header is "Departure" and a DatePicker inside.</p>
  
  <p>My Code is the following:</p>
  
  <pre><code>var body: some View {
      Form {
          HStack {
              Section(header: Text("Passengers")) {
                  Stepper(value: $passengerCount) {
                      Text("\(self.passengerCount)")
                   }
              }
               Divider()               
               Section(header: Text("Departure")) {
                   //Pseudo date picker
                   Text("21 April, 2020")
               }  
          }
      }
  }
  </code></pre>
  
  <p>But the result is like this:</p>
  
  <p><a href="https://i.stack.imgur.com/YQ1KZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YQ1KZ.png" alt="enter image description here"></a></p>
  
  <p>Can anyone tell me how to do this?</p>
  
  <p>How can I create 2 Sections like in the first screenshot?</p>
  
  <p>If it is wrong how I'm thinking... how can I do it better?</p>