calendar: {}
}, config );
+ // See InputWidget#reusePreInfuseDOM about config.$input
+ if ( config.$input ) {
+ config.$input.addClass( 'oo-ui-element-hidden' );
+ }
+
if ( $.isPlainObject( config.formatter ) && config.formatter.format === undefined ) {
config.formatter.format = '@' + config.type;
}
/* Static properties */
- mw.widgets.datetime.DateTimeInputWidget[ 'static' ].supportsSimpleLabel = false;
+ mw.widgets.datetime.DateTimeInputWidget.static.supportsSimpleLabel = false;
/* Events */
* @private
* @param {jQuery} $field
* @param {jQuery.Event} e Key down event
+ * @return {boolean} False to cancel the default event
*/
mw.widgets.datetime.DateTimeInputWidget.prototype.onFieldKeyDown = function ( $field, e ) {
var spec = $field.data( 'mw-widgets-datetime-dateTimeInputWidget-fieldSpec' );
* @private
* @param {jQuery} $field
* @param {jQuery.Event} e Change event
+ * @return {boolean} False to cancel the default event
*/
mw.widgets.datetime.DateTimeInputWidget.prototype.onFieldWheel = function ( $field, e ) {
var delta = 0,