Kendo grid date column not formatting

前端 未结 7 827
悲哀的现实
悲哀的现实 2020-12-07 19:41

I have a KendoGrid like below and when I run the application, I\'m not getting the expected format for date column.

$(\"#empGrid\")         


        
7条回答
  •  渐次进展
    2020-12-07 20:31

    The option I use is as follows:

    columns.Bound(p => p.OrderDate).Format("{0:d}").ClientTemplate("#=formatDate(OrderDate)#");
    
    function formatDate(OrderDate) {
        var formatedOrderDate = kendo.format("{0:d}", OrderDate);
    
        return formatedOrderDate;
    }
    

提交回复
热议问题