Popup filter datepicker does not work

Hello.
I have a grid with locale "es" and when I click on the icon to filter by date, the calendar does not appear and the error is shown in the image below:



To test, I put a DatePicker control on the screen and if that works:


In my component I have:
declare var require: any;

loadCldr(
require("../../../../node_modules/cldr-data/main/es/currencies.json"),
require("../../../../node_modules/cldr-data/main/es/ca-gregorian.json"),
require("../../../../node_modules/cldr-data/main/es/numbers.json"),
require("../../../../node_modules/cldr-data/main/es/timeZoneNames.json"),
require("../../../../node_modules/cldr-data/supplemental/numberingSystems.json"),
require("../../../../node_modules/cldr-data/main/es/dateFields.json")
);
setCulture('es');


In the options:
this.pageSettings = { pageSize: 10 };
this.toolbar = ['ExcelExport', 'Search', 'ColumnChooser'];
this.filterSettings = { type: "Menu" };
this.filter = { type: "CheckBox" };
this.formatOptions={type:'date',format:"dd/MM/yyyy"};

What is it that I need to show the calendar popup?

Regards.






4 Replies

JU Juan July 23, 2018 02:38 PM UTC

Hello.

I managed to show the calendar popup, changing the data type:

<e-column field="Fec_Alta" headerText="Fecha Alta" textAlign='Right' type='date' [format]='formatOptions' width="120"></e-column>



Now, I need that when selecting the date, in the filter it appears as "dd / MM / yyyy" and I would also like to translate the text "TODAY".
How can I do it?

Greetings.




RN Rahul Narayanasamy Syncfusion Team July 24, 2018 11:46 AM UTC

Hi Juan, 
 
Thanks for contacting Syncfusion Support.   
  
The reported issue occurs because the required JSON files are loaded properly in your application before setting the culture of the component. So, please ensure that the JSON files are available in the referred location (within load culture function). Please check the documentation link to load the culture files in your application.   
  
  
For your convenience, we have created a sample and attached in the below link. Please check it.   
  
    
 Run the below commands to run the sample.   
  1. npm install 
  2. npm start
Query: I would also like to translate the text "TODAY" 
 
Please use the below way to change the UI string in datepicker. 
 
 
import { L10n } from '@syncfusion/ej2-base'; 
 
L10n.load({ 
    'en-US': { 
        'datepicker': { 
            today:'heute'  
         } 
    } 
}); 
 
 
Regards, 
Rahul Narayanasamy. 



JU Juan July 24, 2018 02:16 PM UTC

It works!
Thank you very much!



MF Mohammed Farook J Syncfusion Team July 25, 2018 06:54 AM UTC

Hi Juan,  
Thanks for your update. 
 
We are happy to hear that the provided solution has been resolved your problem. 
 
Regards,
J Mohammed Farook
 
 


Loader.
Up arrow icon