Manual:DateTimeInputWidget

MediaWiki includes a DateTimeInputWidget that can be used for user interfaces that require selecting a date and time. You can see an example of it at Special:ApiSandbox. Click on "action=edit" in the left nav and then scroll down to "basetimestamp".

The code for the widget is located in resources/src/mediawiki.widgets.datetime/.