User:DAlangi (WMF)/common.js

mw.loader.using(	'oojs-ui',	'oojs-ui-core',	'mediawiki.widgets.DateInputWidget' ).done( function {	$( function  { var dateInput = new mw.widgets.DateInputWidget; var $label = $( ' ' ); $( '#mw-content-text' ).append( $label, dateInput.$element ); dateInput.on( 'change', function {		    // The value will always be a valid date or empty string, malformed input is ignored		    var date = dateInput.getValue;		    $label.text( 'Selected date: ' + ( date || '(none)' ) );		} ); } ); } );