diff --git a/includes/sys_form.php b/includes/sys_form.php
index d487c9d7..46698a1d 100644
--- a/includes/sys_form.php
+++ b/includes/sys_form.php
@@ -30,21 +30,13 @@ function form_spinner(string $name, string $label, int $value)
return form_element($label, '
-
-
', $id);
}
diff --git a/resources/assets/js/forms.js b/resources/assets/js/forms.js
index 9de1ea48..99140b09 100644
--- a/resources/assets/js/forms.js
+++ b/resources/assets/js/forms.js
@@ -111,6 +111,25 @@ ready(() => {
});
});
+ready(() => {
+ document.querySelectorAll('.spinner-down').forEach((element) => {
+ const inputElement = document.getElementById(element.dataset.inputId);
+ if (inputElement) {
+ element.addEventListener('click', () => {
+ inputElement.stepDown();
+ });
+ }
+ });
+ document.querySelectorAll('.spinner-up').forEach((element) => {
+ const inputElement = document.getElementById(element.dataset.inputId);
+ if (inputElement) {
+ element.addEventListener('click', () => {
+ inputElement.stepUp();
+ });
+ }
+ });
+});
+
/**
* Button to set current time in time input fields.
*/