ASP.NET MVC JsonResult Date Format

前端 未结 25 3741
渐次进展
渐次进展 2020-11-21 11:22

I have a controller action that effectively simply returns a JsonResult of my model. So, in my method I have something like the following:

return new JsonRes         


        
25条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-21 11:59

    add jquery ui plugin in your page.

    function JsonDateFormate(dateFormate, jsonDateTime) {
        return $.datepicker.formatDate(dateFormate, eval('new ' + jsonDateTime.slice(1, -1)));
    };
    

提交回复
热议问题