// Parent constructor
mw.widgets.ExpiryWidget.parent.call( this, config );
- // If the wiki does not want the date picker, then initialize the relative
- // field and exit.
- if ( config.noDatePicker ) {
- this.relativeField.on( 'change', function ( event ) {
- // Emit a change event for this widget.
- this.emit( 'change', event );
- }.bind( this ) );
-
- // Initialization
- this.$element
- .addClass( 'mw-widget-ExpiryWidget' )
- .append(
- this.relativeField.$element
- );
-
- return;
- }
-
// Properties
this.inputSwitch = new OO.ui.ButtonSelectWidget( {
tabIndex: -1,