2016-01-18 33 views
0
<script id="detail-template" type="text/x-kendo-template"> 
    <div class='shipping-details'> 
    <ul> 
     <li><label>Applied:</label>kendo.toString(#= Applied #, "MM-dd-yyyy")</li> 
    </ul> 
    </div> 
</script> 

我在我的模型中有一個我想格式化的DateTime字段。你如何在Telrik的「ASP.NET MVC用戶界面」中做到這一點,以及你如何格式化一般的kendo#變量?在Telerik UI中爲ASP.NET MVC格式化哈希變量

'劍道'。在「text/x-kendo-template」中未被識別,#= Applied#is並且顯示完整的DateTime。

+0

你爲什麼不試試這個呢? http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/grid/server-detail-template – Clarice

回答

0

這是一個語法錯誤。劍道。進入#標籤內。

#= kendo.toString(Applied, "MM-dd-yyyy") #