This commit is contained in:
@@ -29,9 +29,15 @@
|
||||
console.log(path, query);
|
||||
document.getElementById("graph").src = window.origin + path + query
|
||||
}
|
||||
function init() {
|
||||
const zeroPad = (num, places) => String(num).padStart(places, '0')
|
||||
var d = new Date()
|
||||
d.setMonth(d.getMonth()-6)
|
||||
document.getElementsByName("zoomStart")[0].value = `${d.getFullYear()}-${zeroPad(d.getMonth(), 2)}`
|
||||
}
|
||||
</script>
|
||||
</header>
|
||||
<body style="height: 100%;">
|
||||
<body style="height: 100%;" onload="init();">
|
||||
<div id="grapher" style="width: 100%; height: 100%; display: flex; flex-direction: column;">
|
||||
<form onsubmit="draw(this); return false;" style="display: flex; flex-direction: row; flex-wrap: wrap; gap: 1em;">
|
||||
<span>
|
||||
@@ -61,7 +67,7 @@
|
||||
|
||||
<span>
|
||||
<label for="zoomStart">zoomStart</label>
|
||||
<input name="zoomStart" type="text" value="2023-06"/>
|
||||
<input name="zoomStart" type="text" value="YYYY-MM"/>
|
||||
</span>
|
||||
|
||||
<span>
|
||||
|
||||
Reference in New Issue
Block a user