diff --git a/public/js/pages/timerecording/index.js b/public/js/pages/timerecording/index.js index f901b09cf..c2bf0611b 100644 --- a/public/js/pages/timerecording/index.js +++ b/public/js/pages/timerecording/index.js @@ -356,6 +356,7 @@ $(document).ready(function () { $('.car-div').find('input').prop("required", true); $('#mileage_start').val($(this).data('mileagestart')); $('#mileage_end').val($(this).data('mileageend')); + $('#mileage_end').prop("min", $(this).data('mileagestart')); } else { } @@ -482,9 +483,14 @@ $(document).ready(function () { $('.car-div').show(); $('.car-div').find('input').prop("required", true); $('#mileage_start').val($(this).find(':selected').data('mileagenow')); + $('#mileage_end').prop("min", $('#mileage_start').val()); } }); + $("body").on("change", "#mileage_start", function () { + $('#mileage_end').prop("min", $('#mileage_start').val()); + }); + $("body").on("click", ".delete-item", function () { if (confirm('Buchung wirklich löschen?')) { $.post(deleteUrl, { diff --git a/public/js/pages/timerecordingReport/index.js b/public/js/pages/timerecordingReport/index.js index c4f89993a..44307a3e7 100644 --- a/public/js/pages/timerecordingReport/index.js +++ b/public/js/pages/timerecordingReport/index.js @@ -388,6 +388,7 @@ $(document).ready(function () { $('.car-div').find('input').prop("required", true); $('#mileage_start').val($(this).data('mileagestart')); $('#mileage_end').val($(this).data('mileageend')); + $('#mileage_end').prop("min", $(this).data('mileagestart')); } else { } @@ -518,9 +519,14 @@ $(document).ready(function () { $('.car-div').show(); $('.car-div').find('input').prop("required", true); $('#mileage_start').val($(this).find(':selected').data('mileagenow')); + $('#mileage_end').prop("min", $('#mileage_start').val()); } }); + $("body").on("change", "#mileage_start", function () { + $('#mileage_end').prop("min", $('#mileage_start').val()); + }); + $("body").on("click", ".delete-item", function () { if (confirm('Buchung wirklich löschen?')) { $.post(deleteUrl, {