Skip to content

Commit b2a1d94

Browse files
author
kumm
committed
fix default hour,minute,second by changing init order
1 parent 9efeb99 commit b2a1d94

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

jquery-ui-timepicker-addon.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,7 @@ $.extend(Timepicker.prototype, {
107107
_newInst: function($input, o) {
108108
var tp_inst = new Timepicker(),
109109
inlineSettings = {};
110-
111-
tp_inst.hour = tp_inst._defaults.hour;
112-
tp_inst.minute = tp_inst._defaults.minute;
113-
tp_inst.second = tp_inst._defaults.second;
114-
tp_inst.ampm = '';
115-
tp_inst.$input = $input;
116110

117-
118111
for (var attrName in this._defaults) {
119112
var attrValue = $input.attr('time:' + attrName);
120113
if (attrValue) {
@@ -145,6 +138,12 @@ $.extend(Timepicker.prototype, {
145138
timepicker: tp_inst // add timepicker as a property of datepicker: $.datepicker._get(dp_inst, 'timepicker');
146139
});
147140

141+
tp_inst.hour = tp_inst._defaults.hour;
142+
tp_inst.minute = tp_inst._defaults.minute;
143+
tp_inst.second = tp_inst._defaults.second;
144+
tp_inst.ampm = '';
145+
tp_inst.$input = $input;
146+
148147
if (o.altField)
149148
tp_inst.$altInput = $(o.altField)
150149
.css({ cursor: 'pointer' })

0 commit comments

Comments
 (0)