javascript - Properly formatting date for display in firefox -
i have date
$scope.newd = '2015-08-11 12:36:33.649';
coming backend json. in ui want display 11/08/2015.
i using date.parse($scope.newd)
convert , format. not work in ff. how do this?
for cross-browser compatibility,
date string converted "-" "/" removing time,
$scope.olddate = '2015-08-11 12:36:33.649'; $scope.newd= $filter('date')(new date($scope.olddate.split(" ")[0].replace(/-/g,"/")), 'dd/mm/yyyy');
refer link : http://dygraphs.com/date-formats.html
Comments
Post a Comment