dateformat date filter set by calendar-popup

When using a filter on a date column, the date filter is set in a wrong format (US-format) by the calendar-popup.
I already tried this, but that didn't help:

$("#Grid").ejGrid({ locale: "nl-NL", etc.

Is it possible to change the date format which is used by the calendar-popup?



4 Replies

KM Kuralarasan Muthusamy Syncfusion Team May 1, 2018 07:17 AM UTC

Hi Sietse, 

Thanks for contacting Syncfusion support. 

We have analyzed your query and we found that you want to change the datePicker format. So we suggest you to use datePicker localization to achieve your requirement. We have already discussed about this topic in our help documentation. So please refer our help documentation to further assistance. 
 
Please refer the following code example: 
 
<script> 
$(function () { 
            $("#datePicker").ejDatePicker({  
                 
                locale: "de-DE", 
 
                ... 
                  
 
            }); 
        }); 
</script> 
 

Please refer the following link to help documentation: 


If you need further assistance please get back to us, 

Regards, 
Kuralarasan M. 



SW Sietse Wielenga May 3, 2018 09:14 AM UTC

Hi,

It's not about the standalone datePicker, but the datePicker inside the menufilter-popup inside the datagrid.
I already have this code, but it doesn't work.
How to change the code to get it work?

$("#Grid").ejGrid({
  create: function (args: any) {
    this.element.on("mousedown", ".e-gridheader .e-filtericon", function () {
      $("#Grid_datetimeDlg").ejDialog({
        open: function (e) {
          $("#Grid_dpDateTime").ejDatePicker({
            locale: "nl-NL"
          });
        }
      });
    });
  }
});


KM Kuralarasan Muthusamy Syncfusion Team May 4, 2018 12:11 PM UTC

Hi Sietse, 

We have analyzed your query and we are able to reproduce your issue( dateFormat did not changed in Grid menuFilter while using the locale ). 

We confirmed that the issue with “Date Format mismatched in menu filter while filter the Date column” is a defect and we have logged a defect report. The fix for this issue is included in our upcoming release Volume 2  2018 which is expected to be rolled out by the month end of May 2018. 
 
Regards, 
Kuralarasan M. 



KM Kuralarasan Muthusamy Syncfusion Team May 15, 2018 01:10 PM UTC

Hi Sietse, 

We have validated your requirement and the reported issue is the default behavior of the ejDatePicker. If you want to change the format in datePicker then use date format in grid column which is used in referred locale. Please use this workaround for your requirement.  

Please refer the following code example: 

<script type="text/javascript"> 
       $(function () { 
            $("#Grid").ejGrid({ 
 
                    ...... 
 
                columns: [ 
                        { field: "OrderDate", headerText: "Order Date", width: 80, format: "{0:MM-dd-yyyy}", textAlign: ej.TextAlign.Right, priority: 2 }, 
                ] 
            }); 
        }); 
 
</script> 

In this code we have used the locale date format in OrderDate field. We have prepared the sample with your requirement and that sample can be downloadable from the below link, 


If you need further assistance please get back to us, 

Regards, 
Kuralarasan M. 


Loader.
Up arrow icon