urejen html za datum, pripravljen za urejanje v js

This commit is contained in:
iva
2026-11-04 12:25:52 +01:00
parent 8ec40dcebe
commit 85750602f3
2 changed files with 7 additions and 4 deletions
+2 -2
View File
@@ -42,9 +42,9 @@ function preveriEmail() {
function preveriTelefon (){
const vrednost = telefon.value.trim();
const vzorec = /^0\d{2} ?\d{3} ?\d{3}$/; //https://www.w3schools.com/js/js_regexp.asp
const vzorec = /^0\d{2} ?\d{3} ?\d{3}$/; //https://www.w3schools.com/js/js_regexp.asp, spet ^pomeni zacetek besedila, obvezno 0, \d{2} za ničko obvezno dve stevili (d- digit), ?- neobvezen presledek, \d{3} 3 stevila, $ zakljucek besedila
if (!vzorec.test(vrednost)) {
napakaTelefon.textContent = "Vnesite veljavno telefonski številko.";
napakaTelefon.textContent = "Vnesite veljavno telefonsko številko.";
telefon.classList.add("napacno");
return false;
}
+5 -2
View File
@@ -52,8 +52,11 @@
<fieldset class="field_rezervacija">
<legend>Podrobnosti rezervacije:</legend>
Datum obiska
<input type="date" id="datum-obiska" name="datum-obiska" required>
<label for="datum-obiska">Datum obiska</label>
<div class="vnos_rezervacija">
<input type="date" id="datum-obiska" name="datum-obiska" required>
<span class="sporocilo_napake" id="napaka-datum"></span>
</div>
Ura obiska
<input type="time" id="ura-obiska" name="ura-obiska" min="10:00" max="21:00" required>
Število oseb