Skip to content

Commit ba3d8a8

Browse files
Fixed timepicker() to work with no params passed
1 parent ec7678e commit ba3d8a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jquery-ui-timepicker-addon.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,8 @@ $.fn.extend({
462462
timepicker: function(o) {
463463
var tmp_args = arguments;
464464

465-
if (typeof o == 'object') o = $.extend(o, { timeOnly: true });
465+
if(o === undefined) o = { timeOnly: true };
466+
else if (typeof o == 'object') o = $.extend(o, { timeOnly: true });
466467

467468
return this.each(function() {
468469
$(this).datetimepicker(o, tmp_args[1], tmp_args[2], tmp_args[3], tmp_args[4]);

0 commit comments

Comments
 (0)