summaryrefslogtreecommitdiffstats
path: root/src/jquery-ui-timepicker-addon.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/jquery-ui-timepicker-addon.js')
-rw-r--r--src/jquery-ui-timepicker-addon.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/jquery-ui-timepicker-addon.js b/src/jquery-ui-timepicker-addon.js
index a92d277..e701194 100644
--- a/src/jquery-ui-timepicker-addon.js
+++ b/src/jquery-ui-timepicker-addon.js
@@ -109,7 +109,8 @@
controlType: 'slider',
oneLine: false,
defaultValue: null,
- parse: 'strict'
+ parse: 'strict',
+ afterInject: null
};
$.extend(this._defaults, this.regional['']);
};
@@ -319,6 +320,7 @@
this.timeDefined = this._parseTime(currDT);
this._limitMinMaxDateTime(dp_inst, false);
this._injectTimePicker();
+ this._afterInject();
},
/*
@@ -356,6 +358,16 @@
},
/*
+ * Handle callback option after injecting timepicker
+ */
+ _afterInject: function() {
+ var o = this.inst.settings;
+ if ($.isFunction(o.afterInject)) {
+ o.afterInject.call(this);
+ }
+ },
+
+ /*
* generate and inject html for timepicker into ui datepicker
*/
_injectTimePicker: function () {
@@ -500,6 +512,7 @@
this.timezone_select.change(function () {
tp_inst._onTimeChange();
tp_inst._onSelectHandler();
+ tp_inst._afterInject();
});
// End timezone options
@@ -1058,6 +1071,7 @@
$(sel).appendTo(obj).change(function (e) {
tp_inst._onTimeChange();
tp_inst._onSelectHandler();
+ tp_inst._afterInject();
});
return obj;