From 8ad3f66f1cb5a43af0fbbd327bcfe4c85c523983 Mon Sep 17 00:00:00 2001 From: Lawrence Date: Tue, 27 Nov 2012 10:35:00 -0800 Subject: [PATCH] Switch substr to slice as IE8 doesn't do negative substr properly --- jquery-ui-timepicker-addon.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index 39bf32d..1a63efa 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -1768,7 +1768,7 @@ var off = date.getTimezoneOffset() * -1, minutes = off % 60, hours = (off - minutes) / 60; - return (off >= 0 ? '+' : '-') + ('0' + (hours * 101).toString()).substr(-2) + ('0' + (minutes * 101).toString()).substr(-2); + return (off >= 0 ? '+' : '-') + ('0' + (hours * 101).toString()).slice(-2) + ('0' + (minutes * 101).toString()).slice(-2); }; /** @@ -1880,4 +1880,4 @@ */ $.timepicker.version = "1.1.2"; -})(jQuery); \ No newline at end of file +})(jQuery);