2 * JavaScript for Special:NewFiles
6 var start
= mw
.widgets
.datetime
.DateTimeInputWidget
.static.infuse( 'mw-input-start' ),
7 end
= mw
.widgets
.datetime
.DateTimeInputWidget
.static.infuse( 'mw-input-end' ),
10 // If the start date comes after the end date, swap the two values.
11 // This swap is already done internally when the form is submitted with a start date that
12 // comes after the end date, but this swap makes the change visible in the HTMLForm.
13 if ( start
.getValue() !== '' &&
14 end
.getValue() !== '' &&
15 start
.getValue() > end
.getValue() ) {
16 temp
= start
.getValue();
17 start
.setValue( end
.getValue() );
21 }( mediaWiki
, jQuery
) );