From 68cb2e5aaf89fc127bee0d2ea3468fe797637d82 Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Thu, 16 Jan 2014 20:54:33 +0100 Subject: [PATCH] fix(datepicker): remove unneeded date creation Closes #1595 --- src/datepicker/datepicker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datepicker/datepicker.js b/src/datepicker/datepicker.js index 1849f2dcc8..692696376e 100644 --- a/src/datepicker/datepicker.js +++ b/src/datepicker/datepicker.js @@ -69,7 +69,7 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.position']) var days = getDates(firstDate, numDates), labels = new Array(7); for (var i = 0; i < numDates; i ++) { - var dt = new Date(days[i]); + var dt = days[i]; days[i] = makeDate(dt, format.day, (selected && selected.getDate() === dt.getDate() && selected.getMonth() === dt.getMonth() && selected.getFullYear() === dt.getFullYear()), dt.getMonth() !== month); } for (var j = 0; j < 7; j++) {