AngularJS: Filter date with sql date string format -
i need add date filter have date property date string value("2015-10-15t20:00:00.000z"). huge list can't convert every object date , filter. believe there alternative this.
try filter:
angular.module('yourmodule').filter('datetime', function($filter) { return function(input) { var t = input.split(/[- :]/); // apply each element date function var d = new date(t[0], t[1]-1, t[2], t[3], t[4], t[5]); console.log(d); return d; }; });
Comments
Post a Comment