Work around lack of `datetime-local` input support in 2019

This commit is contained in:
Neale Pickett 2019-04-19 03:58:34 +00:00
parent e4fae16023
commit dce5d5f0ac
2 changed files with 12 additions and 3 deletions

View File

@ -17,7 +17,11 @@ function helperUpdateAnswer(event) {
values.push(c.value)
}
}
value = values.join(",")
let join = e.dataset.join
if (join === undefined) {
join = ","
}
value = values.join(join)
}
// First make any adjustments to the value

View File

@ -17,8 +17,13 @@ This is just a demonstration page.
You will probably only want one of these in a page,
to avoid confusing people.
Timestamp
<input type="datetime-local" class="answer">
RFC3339 Timestamp
<div class="answer" data-join="">
<input type="date">
<input type="hidden" value="T">
<input type="time" step="1">
<input type="hidden" value="Z">
</div>
All lower-case letters
<input class="answer lower">