title: Razor pages date input month and day switch around on submit
body: <p>I have a date input field on my Razor page where the month and day switch around every time the form is submitted. Obviously I do not want this to happen but I can not work out why it is.</p>
  
  <p>So 11/10/2019 becomes 10/11/2019 then 11/10/2019 again. The form will also set the date parameter to null if I enter a date that would be invalid in the American format. e.g. 15/11/2019.</p>
  
  <p>This is for a U.K. intranet page so I want the dates to always processed in day month year format. I have tried setting the culture to en-gb where it looks like it needs to be set but this does not seem to have helped.</p>
  
  <p>I am using .net core 3.0.</p>
  
  <p>My date definition (cshtml.cs)</p>
  
  <pre><code>[DataType(DataType.Date)]
      [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:dd/MM/yyyy}")]
      public DateTime MinDate { get; set; } = DateTime.Today;
  </code></pre>
  
  <p>my cshtml</p>
  
  <pre><code>&lt;form asp-page="./ReferralIndex" method="get"&gt;
      &lt;div&gt;
          &lt;p&gt;
              Min Date:
              &lt;input name="minDateIn" value="@Model.MinDate.ToShortDateString()" type="datetime"/&gt;
              Max Date:
              &lt;input type="datetime" name="maxDateIn" value="@Model.MaxDate.ToShortDateString()" /&gt;
              &lt;input type="submit" value="Go" class="btn btn-primary" /&gt;
          &lt;/p&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>my culture settings in startup.cs</p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
          {
              services.Configure&lt;RequestLocalizationOptions&gt;(options =&gt;
                  {
                      options.DefaultRequestCulture = new RequestCulture("en-GB");
                      options.SupportedCultures = new List&lt;CultureInfo&gt; { new CultureInfo("en-GB") };
                  });
  
              services.AddRazorPages();
          }
  
  public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
          {
              var cultureInfo = new CultureInfo("en-GB");
              cultureInfo.NumberFormat.CurrencySymbol = "£";
  
              CultureInfo.DefaultThreadCurrentCulture = cultureInfo;
              CultureInfo.DefaultThreadCurrentUICulture = cultureInfo;
  
              var supportedCultures = new[]
                                          {
                                              new CultureInfo("en-GB"),
                                          };
              app.UseRequestLocalization(new RequestLocalizationOptions
                                             {
                                                 DefaultRequestCulture = new RequestCulture("en-GB"),
                                                 SupportedCultures = supportedCultures,
                                                 SupportedUICultures = supportedCultures
                                             });
          }
  </code></pre>