urejen html za datum, pripravljen za urejanje v js
This commit is contained in:
+2
-2
@@ -42,9 +42,9 @@ function preveriEmail() {
|
|||||||
|
|
||||||
function preveriTelefon (){
|
function preveriTelefon (){
|
||||||
const vrednost = telefon.value.trim();
|
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)) {
|
if (!vzorec.test(vrednost)) {
|
||||||
napakaTelefon.textContent = "Vnesite veljavno telefonski številko.";
|
napakaTelefon.textContent = "Vnesite veljavno telefonsko številko.";
|
||||||
telefon.classList.add("napacno");
|
telefon.classList.add("napacno");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-2
@@ -52,8 +52,11 @@
|
|||||||
<fieldset class="field_rezervacija">
|
<fieldset class="field_rezervacija">
|
||||||
<legend>Podrobnosti rezervacije:</legend>
|
<legend>Podrobnosti rezervacije:</legend>
|
||||||
|
|
||||||
Datum obiska
|
<label for="datum-obiska">Datum obiska</label>
|
||||||
<input type="date" id="datum-obiska" name="datum-obiska" required>
|
<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
|
Ura obiska
|
||||||
<input type="time" id="ura-obiska" name="ura-obiska" min="10:00" max="21:00" required>
|
<input type="time" id="ura-obiska" name="ura-obiska" min="10:00" max="21:00" required>
|
||||||
Število oseb
|
Število oseb
|
||||||
|
|||||||
Reference in New Issue
Block a user