summaryrefslogtreecommitdiff
path: root/templates/index.html
diff options
context:
space:
mode:
authorJulian Jørgensen <julian@jtle.dk>2024-05-24 23:33:49 +0200
committerJulian Jørgensen <julian@jtle.dk>2024-05-24 23:33:49 +0200
commit6cdd02af0684500b5376d4d4a08feb796fdaf889 (patch)
tree7ffb2ded2251fef175f2c0ce6dfbea978152e063 /templates/index.html
parenteabd0e769c2bfef7a7aa748d794675d3ff7a920b (diff)
Add date stuff
Diffstat (limited to 'templates/index.html')
-rw-r--r--templates/index.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/templates/index.html b/templates/index.html
index eecf879..b2dc6b0 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -55,9 +55,9 @@
</head>
<body>
<div id="controls-bar">
- <button>I går</button>
- <input type="date" />
- <button>I morgen</button>
+ <button hx-get="/" hx-replace-url="true" hx-params="date" hx-vals='{"date": "{{.DateInfo.Yesterday}}"}' hx-target="body">I går</button>
+ <input type="date" hx-get="/" hx-replace-url="true" hx-params="date" hx-vals='js:{date: event.target.value}' autocomplete="off" hx-target="body" hx-trigger="change" value="{{.DateInfo.Date}}" />
+ <button hx-get="/" hx-replace-url="true" hx-params="date" hx-vals='{"date": "{{.DateInfo.Tomorrow}}"}' hx-target="body">I morgen</button>
</div>
<div class="flex">
<div>