MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
m (Use DateInput)
No edit summary
Line 2: Line 2:


$(function() {
$(function() {
let dateInput = new mw.widgets.DateInputWidget({id: 'date'});
var dateInput = new mw.widgets.DateInputWidget({id: 'date'});
$('#ir-roman-date-converter').append(dateInput.$element);
$('#ir-roman-date-converter').append(dateInput.$element);
$('#ir-roman-date-converter').append('<div class=\"mw-inputbox-centered\"> \
$('#ir-roman-date-converter').append('<div class=\"mw-inputbox-centered\"> \
Line 11: Line 11:
                 const resultDiv = document.getElementById(\"result\"); \
                 const resultDiv = document.getElementById(\"result\"); \
                 const api = new mw.Api(); \
                 const api = new mw.Api(); \
                 let date = $(#date).getValue(); \
                 let date = $(\'#date\').getValue(); \
                 api.get({ \
                 api.get({ \
                     action: \'expandtemplates\', \
                     action: \'expandtemplates\', \

Navigation menu