admin_manage_user.html: 将默认过期时间设为365天以后.

Hui Lan 2023-03-23 21:54:21 +08:00
parent b97210a9e0
commit 7eb276937a
1 changed files with 10 additions and 2 deletions

View File

@ -52,7 +52,7 @@
<label class="form-label" style="padding-top: 10px;">过期时间</label>
<div>
<input type="date" name="expiry_time" placeholder="YYYY-MM-DD" pattern="yyyyMMdd">
<input type="date" id="expiry_date" name="expiry_time" placeholder="YYYY-MM-DD" pattern="yyyyMMdd">
</div>
</div>
@ -80,4 +80,12 @@
})
</script>
<script>
// Give the user another 365 days
const date = new Date();
date.setDate(date.getDate() + 365);
document.getElementById("expiry_date").value = date.toISOString().split('T')[0];
</script>
</html>