title: Center alignment of DatePicker in SwiftUI iOS 14
body: <p>I have a DatePicker of GraphicalDatePickerStyle and I want to center it inside a rectangle. My code:</p>
  <pre><code>HStack {
          Spacer()
          DatePicker(&quot;&quot;, selection: $notificationTimeOnPicker, displayedComponents: .hourAndMinute).foregroundColor(Color(&quot;ChartColor&quot;)).labelsHidden()
                                  .datePickerStyle(GraphicalDatePickerStyle())
          Spacer()
                              
          }
  </code></pre>
  <p>This is what I get and want:</p>
  <p><a href="https://i.stack.imgur.com/KP7cc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KP7cc.png" alt="enter image description here" /></a></p>
  <p>How do I center my DatePicker? Looks like its frame is wide for some unknown reason. I tried changing its frame size to width: 95 or less to center it but after that I get ... instead of numbers when typing on some devices.</p>