mw.widgets.DateInputWidget: Allow not having a date selected
authorBartosz Dziewoński <matma.rex@gmail.com>
Thu, 30 Jul 2015 22:36:19 +0000 (00:36 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Fri, 31 Jul 2015 18:53:42 +0000 (18:53 +0000)
commit74e4557ec35282c99a8b0323e0afb3be85b7693d
treee8b3fd1924bbcb2dcbd856c289051e87697bba2d
parent4f66acf479bcbebdd3ca539f1313611ef57ff688
mw.widgets.DateInputWidget: Allow not having a date selected

* Allow empty value, that is, no date being selected. Display
  an appropriate label when that is the case.
* Start with no date selected, rather than today's date.
* When the field is empty and gets focus, set the date to today, on
  the assumption that this is likely what the user wants. Permit
  emptying the field, though.
* Highlight today's date on the calendar.

Bonus cleanup:

* Update the UI from #setValue, immediately when needed.
* Improve validation of incoming values.
* Correct some documentation.
* Correct some bad copy-paste in styles which caused disabled widget
  to not display correctly.

Change-Id: I7a1f7ff20eb6fc21ea59ecfe48deb9305c8e29e8
languages/i18n/en.json
languages/i18n/qqq.json
resources/Resources.php
resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.less
resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.js
resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.less