Ajout article final

This commit is contained in:
jleroy
2024-04-24 16:55:05 +02:00
parent bc49d8eeee
commit 09e611656d
8 changed files with 106 additions and 15 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 KiB

View File

@@ -37,7 +37,7 @@
<!-- Mise à prix -->
<div>
<label for="prix">Mise à prix:</label>
<input type="number" id="prix" th:field="*{prixInitial}" min="0" required>
<input type="number" id="prix" th:field="*{prixInitial}" min="0" step="0.01" required>
</div>
<!-- Date début enchère -->
@@ -75,6 +75,19 @@
<form th:action="@{/accueil}" method="post">
<button type="submit">Annuler</button>
</form>
<script>
// Obtenez la date actuelle et j+1
var today = new Date();
var tomorrow = new Date(today);
tomorrow.setDate(tomorrow.getDate() + 1);
// Formatez la date au format YYYY-MM-DD pour l'attribut min
var formattedDateToday = today.toISOString().split('T')[0];
var formattedDateTomorrow = tomorrow.toISOString().split('T')[0];
// Attribuez la date formatée à l'attribut min de l'élément input
document.getElementById('dateDebut').min = formattedDateToday;
document.getElementById('dateFin').min = formattedDateTomorrow;
// Attribuez la date formatée à l'attribut min de l'élément input
</script>
</div>
</body>
</html>