Search code examples
jquery-uijquery-ui-dialog

How to set jQuery UI dialog defaults


How do I set the default values for the jQuery UI dialog? For example, this is how I set the defaults in the jQuery UI datepicker:

$.datepicker.setDefaults({ dateFormat: 'dd/mm/yy' });

I couldn't find the same functionality in the dialog documentation


Solution

  • I found a solution

    $.extend($.ui.dialog.prototype.options, { modal: true, width: 650 });