DateRangePicker format error

Hello, Syncfusion Team. 
In your sample for DateRangePickerFor i get an error: The value '9/29/2021' is not valid.  (see attachment)
How can i fix it? 

Attachment: pack_eef1ae38.zip

5 Replies

DL Deepa Loganathan Syncfusion Team October 9, 2018 05:23 PM UTC

Hi Alex, 
 
  
Thanks for contacting Syncfusion Support. 
 
  
We have validated your query on EJ2 DateRangePickerFor but we are unable to reproduce the reported issue at our end.  
 
 
Based on our analysis and the screenshot provided in your last update, we suspect that, you might have posted a single date string instead of range of date. Please note that, DateRangePicker will accept only date range value of two date strings or a date array with two date objects. It will throw error if a single date value is set via editing in the input element and submitted.   
 
 
For your convenience, we have prepared a sample application with DateRangePickerFor with the value, you have used in the screenshot. Please, find the sample from the following link. 
 
  
 
  
Kindly, check out the following link to know more about EJ2 DateRangePicker. 
 
  
 
  
If this not your case, please get back to us with more information like following list details. 
 
 
  • Culture settings configured in your machine
  • Browser culture settings information.
  • Date format configured in your machine.
  • Configured machine time zone.
  • The value which you set to reproduce this issue in EJ DateRangePicker.
 
This will help us in resolving your issue and provide you a prompt solution at the earliest. 
 
  
Regards, 
 
Deepa L. 



AL Alex October 10, 2018 03:35 PM UTC

Hi.
In your sample after submitting default value 3/3/2020 - 9/21/2021 i have the same error "The value '9/21/2021' is not valid." .
Date format on my machine is "dd.MM.yyyy". 
I think the problem in default project locale en-US, but i don't understand how can i set global locale en-GB for my project


DL Deepa Loganathan Syncfusion Team October 11, 2018 12:44 PM UTC

Hi Alex, 
 
Thanks for the update.  
 
We have investigated your query based on your last update with EJ2 DateRangePicker.  
 
Yes, the validation issue was because of mismatch between “en-US” culture and "dd.MM.yyyy" format. Because the date input value would be validated against the dateformat settings of the culture. 
 
Based on your requirement, we have prepared an application with DateRangePicker and globalized it to “en-GB” culture. Please, download the sample from the below link. 
 
 
Also, check out the following to know more about globalizing the DateRangePicker component. 
 
 
 
Please, let us know if you need any further assistance. 
 
Regards, 
Deepa L. 



AL Alex October 15, 2018 10:21 AM UTC

Thanks for your feedback, it helped me a lot!!!


DL Deepa Loganathan Syncfusion Team October 16, 2018 04:34 AM UTC

Hi Alex, 
Most welcome. Please let us know if you have any further queries. 
Regards,  
Deepa L. 


Loader.
Up arrow icon