我在使用 Angular 2 的 Kendo UI 更改日期过滤器的格式时遇到了麻烦。我的日期列采用 dd/MM/yyyy 格式,但当我使用 filter 时,日期过滤器格式为 MM/dd/yyyy
。如何将过滤器的默认格式更改为 dd/MM/yyyy ?剑道网格列
上的“日期”
最佳答案
您可以将内置过滤器模板用于易于进一步配置的最常见数据类型:
DOCS Built-in date filtering component
<kendo-grid-column field="FirstOrderedOn"
title="First Ordered On"
width="240"
format="{0:dd/MM/yyyy}">
<ng-template kendoGridFilterCellTemplate let-filter let-column="column">
<kendo-grid-date-filter-cell
[column]="column"
[filter]="filter">
</kendo-grid-date-filter-cell>
</ng-template>
</kendo-grid-column>
关于angular - 更改 Kendo UI Angular 2 上的日期过滤器格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47445326/