날짜를 보낼 때 Thymeleaf 날짜 형식에 문제가 있습니다. html로는 .... 올바르게 H3 태그 내에서가 아니라 날짜 선택기의 코드 안에 내가 왜 이해할 수없는 날짜를 보여준다는 하나의 시간과 날짜를 표시하는 이유Thymeleaf 날짜 형식의 th : 값 표시 방법?
<div>
<label for="birthdate" th:text="#{editprofile.about4.birthdate}">Birth date</label>
<label class="input">
<i class="icon-append fa fa-calendar"></i>
<input type="date" name="date" id="birthdate" class="form-control margin-bottom-20" th:value="${#dates.format(profile2about2th.birthdate,'yyyy/MM/dd')}" th:field="*{birthdate}">
</input>
</label>
<h3 th:text="${#dates.format(profile2about2th.birthdate,'yyyy/MM/dd')}"></h3>
</div>
입력란 = "날짜"name = "생년월일"id = "생년월일"class = "form-control margin-bottom-20"value = "1932-10-10 00 : 00 : 00.0 "
감사합니다.
안녕하세요, 많이 감사합니다. 순수한 Thymeleaf를위한 해결책이 있습니까? 컨트롤러에서하지 않으면된다는 뜻인가요? (그래서 내가 포럼에서도 물었습니다.) – Mike
'th : field = "* {birthdate}"'(POST 된 값을 자바 날짜로 다시 변환 시키십시오) 사용하려면 컨트롤러에서해야합니다. – Metroids