mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-15 20:25:50 +00:00
Use "date" type for date inputs
In 2021 we really should be using the browser's own date picker.
This commit is contained in:
parent
67c8bf6a1f
commit
eff7c9529f
1 changed files with 1 additions and 3 deletions
|
@ -9,9 +9,7 @@
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<div th:switch="${type}">
|
<div th:switch="${type}">
|
||||||
<input th:case="'text'" class="form-control" type="text" th:field="*{__${name}__}" />
|
<input th:case="'text'" class="form-control" type="text" th:field="*{__${name}__}" />
|
||||||
<input th:case="'date'" class="form-control" type="text" th:field="*{__${name}__}"
|
<input th:case="'date'" class="form-control" type="date" th:field="*{__${name}__}"/>
|
||||||
placeholder="YYYY-MM-DD" title="Enter a date in this format: YYYY-MM-DD"
|
|
||||||
pattern="(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))"/>
|
|
||||||
</div>
|
</div>
|
||||||
<span th:if="${valid}"
|
<span th:if="${valid}"
|
||||||
class="fa fa-ok form-control-feedback"
|
class="fa fa-ok form-control-feedback"
|
||||||
|
|
Loading…
Reference in a new issue