Fixed setting options, setDate
This commit is contained in:
parent
3a6666bb9e
commit
ec7678e567
16
jquery-ui-timepicker-addon.js
vendored
16
jquery-ui-timepicker-addon.js
vendored
|
@ -460,9 +460,12 @@ $.fn.extend({
|
||||||
// shorthand just to use timepicker..
|
// shorthand just to use timepicker..
|
||||||
//########################################################################
|
//########################################################################
|
||||||
timepicker: function(o) {
|
timepicker: function(o) {
|
||||||
|
var tmp_args = arguments;
|
||||||
|
|
||||||
if (typeof o == 'object') o = $.extend(o, { timeOnly: true });
|
if (typeof o == 'object') o = $.extend(o, { timeOnly: true });
|
||||||
|
|
||||||
return this.each(function() {
|
return this.each(function() {
|
||||||
$(this).datetimepicker(o, arguments[1], arguments[2], arguments[3], arguments[4]);
|
$(this).datetimepicker(o, tmp_args[1], tmp_args[2], tmp_args[3], tmp_args[4]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -471,17 +474,18 @@ $.fn.extend({
|
||||||
//########################################################################
|
//########################################################################
|
||||||
datetimepicker: function(o) {
|
datetimepicker: function(o) {
|
||||||
o = o || {};
|
o = o || {};
|
||||||
var $input = this;
|
var $input = this,
|
||||||
|
tmp_args = arguments;
|
||||||
|
|
||||||
if (typeof(o) == 'string') {
|
if (typeof(o) == 'string') {
|
||||||
if (o == 'setDate') return this.each(function() {
|
if (o == 'setDate') return this.each(function() {
|
||||||
$(this).datepicker(o, arguments[1]);
|
$(this).datepicker(o, tmp_args[1]);
|
||||||
});
|
});
|
||||||
else if(o == 'option' && typeof(arguments[1]) == 'string') return this.each(function() {
|
else if(o == 'option' && typeof(tmp_args[1]) == 'string') return this.each(function() {
|
||||||
$(this).datepicker(o, arguments[1], arguments[2]);
|
$(this).datepicker(o, tmp_args[1], tmp_args[2]);
|
||||||
});
|
});
|
||||||
else if(o == 'dialog') return this.each(function() {
|
else if(o == 'dialog') return this.each(function() {
|
||||||
$(this).datepicker(o, arguments[1], arguments[2], arguments[3], arguments[4]);
|
$(this).datepicker(o, tmp_args[1], tmp_args[2], tmp_args[3], tmp_args[4]);
|
||||||
});
|
});
|
||||||
else return this.each(function() {
|
else return this.each(function() {
|
||||||
$(this).datepicker(o);
|
$(this).datepicker(o);
|
||||||
|
|
Loading…
Reference in a new issue