17 lines
509 B
HTML
17 lines
509 B
HTML
<div class=""> Time </div>
|
|
<div class="form-group">
|
|
<label>
|
|
<input type="time" name="time" id="id_time"
|
|
{# value="{{ form.time.field.queryset }}"#}
|
|
class="form-control"
|
|
>
|
|
</label>
|
|
</div> <br>
|
|
|
|
<script>
|
|
const timeInput = document.getElementById("id_time");
|
|
const now = new Date();
|
|
const hours = String(now.getHours()).padStart(2, '0');
|
|
const minutes = String(now.getMinutes()).padStart(2, '0');
|
|
timeInput.value = `${hours}:${minutes}`;
|
|
</script> |