summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrent Richardson <trentdrichardson@gmail.com>2010-11-16 11:35:30 -0500
committerTrent Richardson <trentdrichardson@gmail.com>2010-11-16 11:35:30 -0500
commitec7678e567fecd613849dc579defb5ceb5c64d9e (patch)
tree53f7dceef8977d0517c4618cc98887a33364be74
parent3a6666bb9e32b88a48efe1d370ee23cdfff72969 (diff)
downloadjQuery-Timepicker-Addon-ec7678e567fecd613849dc579defb5ceb5c64d9e.zip
jQuery-Timepicker-Addon-ec7678e567fecd613849dc579defb5ceb5c64d9e.tar.gz
jQuery-Timepicker-Addon-ec7678e567fecd613849dc579defb5ceb5c64d9e.tar.bz2
Fixed setting options, setDate
-rw-r--r--jquery-ui-timepicker-addon.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js
index 8e482c3..1c67897 100644
--- a/jquery-ui-timepicker-addon.js
+++ b/jquery-ui-timepicker-addon.js
@@ -460,9 +460,12 @@ $.fn.extend({
// shorthand just to use timepicker..
//########################################################################
timepicker: function(o) {
+ var tmp_args = arguments;
+
if (typeof o == 'object') o = $.extend(o, { timeOnly: true });
+
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) {
o = o || {};
- var $input = this;
+ var $input = this,
+ tmp_args = arguments;
if (typeof(o) == 'string') {
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() {
- $(this).datepicker(o, arguments[1], arguments[2]);
+ else if(o == 'option' && typeof(tmp_args[1]) == 'string') return this.each(function() {
+ $(this).datepicker(o, tmp_args[1], tmp_args[2]);
});
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() {
$(this).datepicker(o);