From ee83b6ffb7d5e01ace8244a00e40b20557a68474 Mon Sep 17 00:00:00 2001 From: doublerebel Date: Sat, 27 Nov 2010 10:33:53 -0800 Subject: [PATCH] Fix to apply regional settings from global defaults to new instance --- 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 1cf535f..dbb0366 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -96,7 +96,7 @@ $.extend(Timepicker.prototype, { var tp_inst = new Timepicker(), inlineSettings = {}; - for (var attrName in tp_inst._defaults) { + for (var attrName in this._defaults) { var attrValue = $input.attr('time:' + attrName); if (attrValue) { try { @@ -106,7 +106,7 @@ $.extend(Timepicker.prototype, { } } } - tp_inst._defaults = $.extend({}, tp_inst._defaults, inlineSettings, o, { + tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, o, { beforeShow: function(input, dp_inst) { tp_inst.hour = tp_inst._defaults.hour; tp_inst.minute = tp_inst._defaults.minute;