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.


3 Replies

DR Deepak Ramakrishnan Syncfusion Team August 11, 2021 09:10 AM UTC

Hi Vasyl , 
 
Greetings from Syncfusion support. 
 
We have validated the reported issue with the provided sample. Unfortunately we couldn’t able to reproduce it in our end. Please refer the video and sample for your reference. 
 
Also we suggest you to follow the below steps :  
 
  1. 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> 
 
 
  1. Upgrade to the latest version (19.2.0.55 ) if you are using older versions
 
If you still reproduce the issue after the above suggestion , kindly provide the following details to validate the issue from our end. 
 
  1. Video demonstration which reproduces the issue.
  2. Simple sample which reproduces the issue.
  3. Your system date format and culture.
  4. If any specific replication procedures you have followed other than the previous update .
 
The above details would help us to analyze the issue and provide you the better solution.

Video Link
: https://www.syncfusion.com/downloads/support/forum/167990/ze/BlazorApp1_-_Google_Chrome_2021-08-11_13-44-541368272076 
 
 
Thanks, 
Deepak R. 



VS Vasyl Shepelyov August 13, 2021 03:25 AM UTC

Thank you, updating to the latest version solved the problem.



DR Deepak Ramakrishnan Syncfusion Team August 13, 2021 06:34 AM UTC

Hi Vasyl, 


Thanks for your update. 

We are glad that the issue resolved at your end . We will always happy to assist you , if you need any further assistance. 

Thanks, 
Deepak R. 


Loader.
Up arrow icon