From 36743bc691f7fec0e7ec74695a3c724fdc16fb80 Mon Sep 17 00:00:00 2001 From: johannesbe Date: Mon, 27 May 2013 22:30:28 +0300 Subject: [PATCH] Update bootstrap-datetimepicker.js setStartDate & setEndDate hadn't worked for me. Solution: Replace "new UTCDate(date)" with "parseDate(date)" --- src/js/bootstrap-datetimepicker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/bootstrap-datetimepicker.js b/src/js/bootstrap-datetimepicker.js index 591bf42a5..9599f537b 100644 --- a/src/js/bootstrap-datetimepicker.js +++ b/src/js/bootstrap-datetimepicker.js @@ -211,7 +211,7 @@ if (date instanceof Date) { this.startDate = date; } else if (typeof date === 'string') { - this.startDate = new UTCDate(date); + this.startDate = this.parseDate(date); if (! this.startDate.getUTCFullYear()) { this.startDate = -Infinity; } @@ -227,7 +227,7 @@ if (date instanceof Date) { this.endDate = date; } else if (typeof date === 'string') { - this.endDate = new UTCDate(date); + this.endDate = this.parseDate(date); if (! this.endDate.getUTCFullYear()) { this.endDate = Infinity; }