We are using the ASPNET Core DateRangePicker
<ejs-daterangepicker id="daterange" placeholder="Choose a Range" startDate="@Model.DateFrom" endDate="@Model.DateTo" format="@Model.DateFormatString">
</ejs-daterangepicker>
We need to get the value of the date range into the server side controller so we are posting the form that wraps the DateRangePicker. The form value is is sent up with two string values one for the start date and one for the end date. However I cannot see a way of formatting the dates. This means that on the server I run the risk of parsing errors. The dates I am currently receiving are "10/20/2020" and "1/20/2021", trying to get them into a DateTime results in an error.
The format attribute on ejs-daterangepicker only affects the UI rendering not the output. Is there another way? Are the dates always output as "mm/dd/yyyy"?
Thanks