Page MenuHomePhabricator

Date field will be prefilled with invalid date on Special:Log if 0000 is submitted
Closed, ResolvedPublic


Steps to reproduce:

Event Timeline

Looks like @Legoktm fixed the server side part of this in f198154d76782 / T201411 but the client side error is still present.

Possibly regression from 38756eae46a87c / T117737

If I go to html source view-source:

<tr class="mw-htmlform-field-HTMLDateTimeField mw-htmlform-datetime-field"><td class="mw-label"><label for="mw-input-wpdate">From date (and earlier):</label></td><td class="mw-input"><input id="mw-input-wpdate" name="wpdate" size="45" value="-0001-11-30" class="mw-htmlform-datetime-field" placeholder="YYYY-MM-DD" step="1" pattern="[0-9]{4}-[01][0-9]-[0-3][0-9]" type="date"/>

So maybe other browsers are ignoring the invalid html default value, but mine is not

Change 473527 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@master] LogEventsList: Don't output '0000-00-00' as default date

Change 473527 merged by jenkins-bot:
[mediawiki/core@master] LogEventsList: Don't output '0000-00-00' as default date

matmarex claimed this task.
matmarex removed a project: Patch-For-Review.