From e5d955d763dddc73055d45151c65a5fc1656395d Mon Sep 17 00:00:00 2001 From: 马宇豪 <978517621@qq.com> Date: 星期三, 19 六月 2024 13:42:44 +0800 Subject: [PATCH] 添加 --- src/main/resources/templates/tr/specialCheckTaskLog/edit.html | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/resources/templates/tr/specialCheckTaskLog/edit.html b/src/main/resources/templates/tr/specialCheckTaskLog/edit.html index fbbfe9a..645e0bd 100644 --- a/src/main/resources/templates/tr/specialCheckTaskLog/edit.html +++ b/src/main/resources/templates/tr/specialCheckTaskLog/edit.html @@ -37,7 +37,7 @@ <div class="col-sm-8"> <div class="input-group date"> <span class="input-group-addon"><i class="fa fa-calendar"></i></span> - <input name="checkDate" th:value="${#dates.format(specialCheckTaskLog.checkDate, 'yyyy-MM-dd')}" class="form-control" type="text" required> + <input name="checkDate" th:value="${#dates.format(specialCheckTaskLog.checkDate, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" type="text" required> </div> </div> </div> @@ -60,9 +60,12 @@ <th:block th:include="include :: datetimepicker-js"/> <script th:inline="javascript"> var prefix = ctx + "tr/specialCheckTaskLog"; - + var now = new Date(); + var hour = now.getHours(); //获取当前小时数(0-23) + var minute = now.getMinutes(); //获取当前分钟数(0-59) + var second = now.getSeconds(); //获取当前秒数(0-59) $("input[name='checkDate']").datetimepicker({ - format: "yyyy-mm-dd", + format: "yyyy-mm-dd" + ' ' + hour.toString().padStart(2, '0') + ':' + minute.toString().padStart(2, '0') + ':' + second.toString().padStart(2, '0'), minView: "month", autoclose: true }); -- Gitblit v1.9.2