630
edits
m (Use DateInput) |
No edit summary |
||
Line 2: | Line 2: | ||
$(function() { | $(function() { | ||
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\', \ |