DatePicker property value

Hello,

in latest version (ej2-calendars and ej2-angular-calendars) I am trying to set value for date picker component like:
*.html
<ejs-datepicker [value]="value"></ejc-datepicker>
*.ts
public value = new Date();

And I am getting empty component value and an error when I want to expand calendar on component click - Cannot convert undefined on null to object.


1 Reply

DL Deepa Loganathan Syncfusion Team October 23, 2018 04:52 PM UTC

Hi Customer,  
 
Thank you for contacting Syncfusion support.  
 
We have analyzed the error message in your update. The reported issue “Cannot convert undefined on null to object” usually occurs if the CLDR was not referred properly in the application. So please ensure if the CLDR data is properly referred as shown in the below code.  
 
 
import * as numberingSystems from '../numberingSystems.json'; 
import * as gregorian from '../ca-gregorian.json'; 
import * as numbers from '../numbers.json'; 
import * as detimeZoneNames from '../timeZoneNames.json'; 
import { DatePickerComponent } from '@syncfusion/ej2-ng-calendars'; 
loadCldr(numberingSystems, gregorian, numbers, detimeZoneNames); 
 
 
 
For your reference, we have prepared sample based on your culture and is available in the following link.  
 
 
If the issue still persists, kindly share us the below details that would help us proceed further.  
 
1.      Package json, “syncfusion module references” in your application 
 
2.      Packages imported in the Datepicker Component page 
 
Regards,  
Deepa L. 


Loader.
Up arrow icon