volosoft / jtable

A JQuery plugin to create AJAX based CRUD tables.
http://www.jtable.org
1.1k stars 505 forks source link

DateTime Format Not Enough #1289

Open bikaqiou2000 opened 10 years ago

bikaqiou2000 commented 10 years ago

hi: the funtion object "_parseDate: function (dateString) {...}" require datestring format in like one of belows: /Date(1320259705710)/ 2011-01-01 20:32:42 : (YYYY-MM-DD HH:MM:SS) 2011-01-01 : (YYYY-MM-DD)

my project mvc5 webapi method return date string like : "2014-05-11T15:00:05.5740782+08:00", the function can't work with that arg.

so can you add compatibility for new format string in this function to solve this problem;

hikalkan commented 10 years ago

I also use MVC5 web API but it does not return like that. I think this format is not good. You can override formattin of datetimes in Web API if you can. If you can not, you can use display option of jTable to parse and show dates like that. See: http://jtable.org/ApiReference/FieldOptions#fopt-display. You can get your datetime field like data.record.YourFieldName and return display text for that.