aboutsummaryrefslogtreecommitdiffstats
path: root/includes/widget/DateInputWidget.php
Commit message (Collapse)AuthorAgeFilesLines
* widget: Add pending state to Date(Time)InputWidgetDaimona Eaytoy2024-12-141-0/+1
| | | | | | | | | | | | Use PendingTextInputWidget to provide a "loading" state and avoid the ugly transition from the vanilla input field to OOUI. Make sure the no-JS version never sees the pending state. Based on the implementation in TagMultiselectWidget. Bug: T382186 Change-Id: Iebb497a9c4cfb2c7b76fb4ffb7709e05c77a068a
* htmlform: Add missing documentation to class propertiesUmherirrender2024-09-141-0/+8
| | | | | | | | | | Add doc-typehints to class properties found by the PropertyDocumentation sniff to improve the documentation. Once the sniff is enabled it avoids that new code is missing type declarations. This is focused on documentation and does not change code. Change-Id: I1f306a3925d6768209a06e70082598b2f70cd319
* Refactor widget classes to use cleaner namespacingDogu2024-01-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch refactors various widget classes in the includes/widget directory to use cleaner namespacing. The patches remove redundant backslash prefixes in class extending statements and add use statements for OOUI classes and other MediaWiki-specific classes. This patch improves readability and maintainability of the code by following the MediaWiki coding conventions and leverages the benefits of PHP's namespacing system. List of affected classes: - CheckMatrixWidget - DateInputWidget - DateTimeInputWidget - NamespaceInputWidget - SearchInputWidget - SelectWithInputWidget - SizeFilterWidget - SpinnerWidget - TagMultiselectWidget - TitleInputWidget - UserInputWidget Additionally, the code now correctly documents exceptions thrown by constructors where missing, enforcing clearer developer expectations. Change-Id: I0fdaf68a412a1c3b7049a79222f4dbeaa95a6bbc
* Allow setting min/max on DateInputWidgettacsipacsi2022-10-211-10/+18
| | | | | | | | | | | | | This is required for HTMLDateTimeField to be compatible it: HTMLDateTimeField filters out mustBeAfter/mustBeBefore, while DateInputWidget didn’t understand min/max until now. Since moment.js (used by the JavaScript side of the widget) seems to better like the mustBeAfter/mustBeBefore semantics (strictly larger/smaller than) than the min/max one (larger/smaller than or equal to), I decided to internally keep mustBeAfter/mustBeBefore. Bug: T219633 Change-Id: I487363e40d1e4f74780ed7146c8a6770bfc61fae
* Replace tabs with spacesMatěj Suchánek2020-09-041-1/+1
| | | | Change-Id: Id034c34a294585f58dba58c26db466e0e39cb557
* widget: Fix changes of copyright yearKunal Mehta2018-01-241-1/+1
| | | | | | Fixes up e8b10f68049c19a. Change-Id: I474e508a2bd4d783272eda87c1cc91f5597bc1b1
* Simplify documentation headers of includes/widgets/…Widget.php filesThiemo Mättig2018-01-101-6/+2
| | | | | | | | Most notably: The documentation header repeats the file name. This appears to be fully automatically generated, but does not add helpful information. Change-Id: I9edf15dd25ef6cc52fe931fffde69f0bd9042474
* Improve some parameter docsUmherirrender2018-01-071-23/+23
| | | | Change-Id: I31e983d7ac287158101b18ad95779d83537302a2
* Put menus/popups of infused PHP widgets into the default overlayBartosz Dziewoński2018-01-021-12/+1
| | | | | | | | | | | | With some special tweaks: * Remove weird custom overlay handling in DateInputWidget that nobody actually used. I think if you need something special like that, you can just write two lines of JS code to attach the dropdown elsewhere. * Also handle the CapsuleMultiselectWidget produced by HTMLForm's 'multiselect' field in the same way. Bug: T183069 Change-Id: I693f406194aeb826a3ab5bc78c97015b0b8a7fdb
* Remove self-explaining "section heading" comments from classesThiemo Mättig2017-12-281-1/+0
| | | | | | | | I can see that "parent::__construct" literally calls the parent constructor. I can see that stuff preceeded by the keyword "protected" is protected. I really (really) don't need comments explaining such. Change-Id: I7458e714976a6acd3ba6a7c93fdc27d03903df83
* Option for DateInputWidget to display full month and day namesGeoffrey Mon2017-01-311-0/+11
| | | | | | | | | Add a "longDisplayFormat" config option to DateInputWidget to show full month and day names when using the default locale-specific display format. Bug: T120733 Change-Id: I2db6892720abf86dfc9655291b1070aa7f7bf77b
* Add PHP DateInputWidgetGeoffrey Mon2016-11-011-0/+165
Bug: T120733 Change-Id: I8f80e27304a916bba16ed255c8e78073f9da3813