# What's new in Scheduler v4.2.3

## Configurable ExportDialog widget

In previous releases it was difficult to configure the export dialog widget. In the new release we applied the approach
which proved itself to be very flexible. You can customize widgets using the new 
[public](#Scheduler/feature/export/PdfExport#config-exportDialog) config `exportDialog`:

```javascript
const scheduler = new Scheduler({
    features : {
        pdfExport : {
            exportDialog : {
                items : {
                    // hide the field
                    orientationField  : { hidden : true },

                    // move the field up
                    exporterTypeField : { weight : 150 },

                    // change default format in exporter
                    fileFormatField   : { value : 'png' },

                    // configure nested items
                    rangesContainer : {
                        layoutStyle : {
                            flexDirection : 'column'
                        },
                        items : {
                            rangeStartField : { value : new Date() }
                        }
                    }
                }
            }
        }
    }
});

scheduler.features.pdfExport.showExportDialog();
```

You can add new fields, buttons, containers (any widget, essentially) and use their values in the export listeners. For
more info please refer to the updated [Export Dialog](#Scheduler/view/export/SchedulerExportDialog) documentation.

Also, export dialog has become [publicly available](#Scheduler/feature/export/PdfExport#property-exportDialog) on the feature
instance, which allows adding listeners directly to it:

```javascript
const scheduler = new Scheduler({
    features : {
        pdfExport : true
    }
});

scheduler.features.pdfExport.exportDialog.on({
    show() {
        const { columnsField } = this.widgetMap;
        // When dialog opens all columns with name matching 'date' would
        // be selected in the columns field 
        columnsField.value = scheduler.columns.query(c => c.name.match(/date/i));
    }
})
```

Compared to previous releases export dialog is always there when you refer to it.


## Controlling default duration when creating events with double click

You can now define the default new event duration when user double clicks the schedule area. By setting 
config `createEventOnDblClick : { useEventModelDefaults : true }`, the default duration and durationUnit
will be read from the default values of the `duration` and `durationUnit` fields. 


<p class="last-modified">Last modified on 2023-10-26 8:19:20</p>