Fixed date formatting issue by using moment.js