DateRangePicker changes date format on manual input
Hello,
I have an issue with daterangepicker. When I try to change date manually directly in the control, it changes format from yyyy-MM-dd to yyyy-dd-MM, but then when I open calendar, it shows selection as if it was yyyy-MM-dd.
Initially it looks like this (pre-populated from the code):
So it means 9th till 10th of August.
I try to change 08-09 to 08-01 (to make it 1st of August):
Once I remove focus from the control, it starts to look like this (days and months swapped):
When I open calendar, it looks like this:
This is Blazor Server app with .net core 5.0
My code:
View:
<SfDateRangePicker @bind-StartDate="@ordersStartDate" @bind-EndDate="@ordersEndDate" Format="yyyy-MM-dd" Placeholder="Choose order date range"></SfDateRangePicker>
Code section:
DateTime ordersStartDate = DateTime.Now.Date.AddDays(-1);
DateTime ordersEndDate = DateTime.Now.Date;Thank you in advance.
- Set ‘TValue’ property as like below highlighted code .
|
<SfDateRangePicker TValue="DateTime" @bind-StartDate="@ordersStartDate" @bind-EndDate="@ordersEndDate" Format="yyyy-MM-dd" Placeholder="Choose order date range"></SfDateRangePicker>
|
- Upgrade to the latest version (19.2.0.55 ) if you are using older versions
- Video demonstration which reproduces the issue.
- Simple sample which reproduces the issue.
- Your system date format and culture.
- If any specific replication procedures you have followed other than the previous update .
Video Link : https://www.syncfusion.com/downloads/support/forum/167990/ze/BlazorApp1_-_Google_Chrome_2021-08-11_13-44-541368272076
Thank you, updating to the latest version solved the problem.
- 3 Replies
- 2 Participants
-
VS Vasyl Shepelyov
- Aug 10, 2021 01:26 PM UTC
- Aug 13, 2021 06:34 AM UTC