From: Bartosz DziewoƄski Date: Tue, 4 Aug 2015 12:00:02 +0000 (+0200) Subject: mw.widgets.DateInputWidget: Don't set today's date on activation X-Git-Tag: 1.31.0-rc.0~10531 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/rappels.php?a=commitdiff_plain;h=66686f8c5e4df1c2cc94273918b9328269d2ec09;p=lhc%2Fweb%2Fwiklou.git mw.widgets.DateInputWidget: Don't set today's date on activation Per Mark's review on Ia7bb737bc11b0af3659552fa75d11e6663e2812e. Change-Id: Ie96602514dd57ffbe655d4ba4a8b5028771acda8 --- diff --git a/resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.js b/resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.js index 3888fc71c9..c20924b16f 100644 --- a/resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.js +++ b/resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.js @@ -233,15 +233,6 @@ * @private */ mw.widgets.DateInputWidget.prototype.activate = function () { - if ( this.getValue() === '' ) { - // Setting today's date is probably more helpful than leaving the widget empty? We could just - // display the placeholder and leave it there, but it's likely that at least the year will be - // the same as today's. - - // Use English locale to avoid number formatting - this.setValue( moment().locale( 'en' ).format( this.getInternalFormat() ) ); - } - this.$element.addClass( 'mw-widget-dateInputWidget-active' ); this.handle.toggle( false ); this.textInput.toggle( true );