title: How to set UIDatePicker background color to white in xamarin.ios for ios 14?
body: <p>I am hiding a label by a UIDatePicker in a xamarin.ios app. I changed the style of the datepicker label but can't change the background to white. Here is my code:</p>
  <pre><code>            datePickerDateFrom.Frame = lblFromDate.Frame;
              datePickerDateFrom.Subviews[0].Subviews[0].SetValueForKey(UIColor.White, new NSString(&quot;backgroundColor&quot;));
              datePickerDateFrom.Subviews[0].Subviews[0].TintColor = UIColor.Black;
              datePickerDateFrom.Subviews[0].Subviews[0].Layer.BorderWidth = 1;
              datePickerDateFrom.Subviews[0].Subviews[0].Layer.CornerRadius = 6;
              datePickerDateFrom.Subviews[0].Subviews[0].Layer.BorderColor = UIColor.FromRGB(0, 184, 212).CGColor;
  
              datePickerDateFrom.SizeToFit();
              Add(datePickerDateFrom);
  </code></pre>
  <p>And the result is:
  <a href="https://i.stack.imgur.com/SRZ1c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SRZ1c.png" alt="enter image description here" /></a></p>
  <p>Any other color works but if I set the color to white it remains this ash color that's why sometimes there is a color difference inside the blue border when the short date format is selected. I don't know is it possible to align the value inside the frame and specify any fixed date format(as sometimes it displays 3 letter of month name when gets larger space). For now changing the background color to white would be a great help. Thanks in advance.</p>