this.clearButton = new OO.ui.ButtonWidget( {
classes: [ 'mw-widgets-datetime-dateTimeInputWidget-field', 'mw-widgets-datetime-dateTimeInputWidget-clearButton' ],
framed: false,
- icon: 'trash',
+ icon: 'clear',
disabled: disabled
} ).connect( this, {
click: 'onClearClick'
);
}
if ( $field.is( ':input' ) ) {
- $field.select();
+ $field.trigger( 'select' );
}
return false;
}
this.setValue( this.formatter.getDefaultDate() );
}
if ( $field.is( ':input' ) ) {
- $field.select();
+ $field.trigger( 'select' );
}
if ( this.calendar ) {
*/
mw.widgets.datetime.DateTimeInputWidget.prototype.focus = function () {
if ( !this.getFocusedField().length ) {
- this.$fields.find( '.mw-widgets-datetime-dateTimeInputWidget-editField' ).first().focus();
+ this.$fields.find( '.mw-widgets-datetime-dateTimeInputWidget-editField' ).first().trigger( 'focus' );
}
return this;
};