summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrent Richardson <trentdrichardson@gmail.com>2010-11-18 16:58:02 -0500
committerTrent Richardson <trentdrichardson@gmail.com>2010-11-18 16:58:02 -0500
commit88a0b943bc2e72e5896b8bdae49263376ac089d6 (patch)
tree9904d08cef3d894da5f767ba469afc047c485da7
parent5a598298de5a047331b0c4090cfbd36a1ec952e1 (diff)
downloadjQuery-Timepicker-Addon-88a0b943bc2e72e5896b8bdae49263376ac089d6.zip
jQuery-Timepicker-Addon-88a0b943bc2e72e5896b8bdae49263376ac089d6.tar.gz
jQuery-Timepicker-Addon-88a0b943bc2e72e5896b8bdae49263376ac089d6.tar.bz2
Corrected methods
-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 0d2718f..3f591bf 100644
--- a/jquery-ui-timepicker-addon.js
+++ b/jquery-ui-timepicker-addon.js
@@ -529,8 +529,8 @@ $.fn.extend({
if (typeof o == 'object') tmp_args[0] = $.extend(o, { timeOnly: true });
- return this.each(function() {
- $.fn.datepicker.apply(this, tmp_args);
+ return $(this).each(function() {
+ $.fn.datetimepicker.apply($(this), tmp_args);
});
},
@@ -542,10 +542,14 @@ $.fn.extend({
var $input = this,
tmp_args = arguments;
- if (typeof(o) == 'string')
- return this.each(function() {
- $.fn.datepicker.apply(this, tmp_args);
- });
+ if (typeof(o) == 'string'){
+ if(o == 'getDate')
+ return $.fn.datepicker.apply($(this), tmp_args);
+ else
+ return this.each(function() {
+ $.fn.datepicker.apply($(this), tmp_args);
+ });
+ }
else
return this.each(function() {
$(this).datepicker($.timepicker._newInst($input, o)._defaults);