Skip to content

Commit 8ad3f66

Browse files
Switch substr to slice as IE8 doesn't do negative substr properly
1 parent 76285d2 commit 8ad3f66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jquery-ui-timepicker-addon.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1768,7 +1768,7 @@
17681768
var off = date.getTimezoneOffset() * -1,
17691769
minutes = off % 60,
17701770
hours = (off - minutes) / 60;
1771-
return (off >= 0 ? '+' : '-') + ('0' + (hours * 101).toString()).substr(-2) + ('0' + (minutes * 101).toString()).substr(-2);
1771+
return (off >= 0 ? '+' : '-') + ('0' + (hours * 101).toString()).slice(-2) + ('0' + (minutes * 101).toString()).slice(-2);
17721772
};
17731773

17741774
/**
@@ -1880,4 +1880,4 @@
18801880
*/
18811881
$.timepicker.version = "1.1.2";
18821882

1883-
})(jQuery);
1883+
})(jQuery);

0 commit comments

Comments
 (0)