mirror of
https://github.com/Dvorinka/PPve.git
synced 2026-06-03 20:12:59 +00:00
ef
This commit is contained in:
+21
-2
@@ -172,7 +172,7 @@
|
||||
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
||||
<i class="fas fa-clock text-gray-400"></i>
|
||||
</div>
|
||||
<input type="time" id="time_start" name="time_start" required
|
||||
<input type="time" id="time_start" name="time_start" required step="3600
|
||||
class="block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-brand-light-blue focus:border-brand-light-blue">
|
||||
</div>
|
||||
</div>
|
||||
@@ -197,7 +197,7 @@
|
||||
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
||||
<i class="fas fa-clock text-gray-400"></i>
|
||||
</div>
|
||||
<input type="time" id="time_end" name="time_end" required
|
||||
<input type="time" id="time_end" name="time_end" required step="3600"
|
||||
class="block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-brand-light-blue focus:border-brand-light-blue">
|
||||
</div>
|
||||
</div>
|
||||
@@ -593,5 +593,24 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add this JavaScript to enforce full hours -->
|
||||
<script>
|
||||
// Function to round time to nearest hour
|
||||
function roundToHour(input) {
|
||||
const time = input.value;
|
||||
if (time) {
|
||||
const [hours, minutes] = time.split(':');
|
||||
input.value = `${hours}:00`;
|
||||
}
|
||||
}
|
||||
|
||||
// Add event listeners to time inputs
|
||||
const timeInputs = document.querySelectorAll('input[type="time"]');
|
||||
timeInputs.forEach(input => {
|
||||
input.addEventListener('change', () => roundToHour(input));
|
||||
input.addEventListener('blur', () => roundToHour(input));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+8
-7
@@ -284,13 +284,14 @@
|
||||
<div class="form-group">
|
||||
<label for="vehicle">Vozidlo</label>
|
||||
<select id="vehicle" name="vehicle" required
|
||||
class="w-full p-2 border border-gray-300 rounded-md">
|
||||
<option value="">Vyberte vozidlo...</option>
|
||||
<option value="VW Caddy">VW Caddy - 4Z1 8241</option>
|
||||
<option value="VW Golf">VW Golf - 5Z5 8694</option>
|
||||
<option value="Škoda Fabia">Škoda Fabia - 1Z3 5789</option>
|
||||
<option value="BMW 218d">BMW 218d - 6Z5 4739</option>
|
||||
<option value="Škoda Superb">Škoda Superb - 2BY 2398</option>
|
||||
class="block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-brand-light-blue focus:border-brand-light-blue appearance-none">
|
||||
<option value="" selected disabled>Vyberte vozidlo...</option>
|
||||
<option value="VW Caddy - 4Z1 8241">VW Caddy - 4Z1 8241</option>
|
||||
<option value="VW Golf - 5Z5 8694">VW Golf - 5Z5 8694</option>
|
||||
<option value="Škoda Fabia - 1Z3 5789">Škoda Fabia - 1Z3 5789</option>
|
||||
<option value="BMW 218d - 6Z5 4739">BMW 218d - 6Z5 4739</option>
|
||||
<option value="BMW 218d - 6Z5 4740">BMW 218d - 6Z5 4740</option>
|
||||
<option value="Škoda Superb - 2BY 2398">Škoda Superb - 2BY 2398</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user