Fixed timepicker() to work with no params passed

This commit is contained in:
Trent Richardson 2010-11-18 08:35:41 -05:00
parent ec7678e567
commit ba3d8a86bd

View file

@ -462,7 +462,8 @@ $.fn.extend({
timepicker: function(o) {
var tmp_args = arguments;
if (typeof o == 'object') o = $.extend(o, { timeOnly: true });
if(o === undefined) o = { timeOnly: true };
else if (typeof o == 'object') o = $.extend(o, { timeOnly: true });
return this.each(function() {
$(this).datetimepicker(o, tmp_args[1], tmp_args[2], tmp_args[3], tmp_args[4]);