diff --git a/application/controllers/Logbook.php b/application/controllers/Logbook.php index f9247db90..b5ee58806 100644 --- a/application/controllers/Logbook.php +++ b/application/controllers/Logbook.php @@ -54,8 +54,6 @@ class Logbook extends CI_Controller { $data['qra'] = "none"; } - - // load the view $data['page_title'] = __("Logbook"); @@ -79,6 +77,10 @@ class Logbook extends CI_Controller { // Normalize the date only if it's not empty if (!empty($date)) { + if (strpos($date, '_') !== false) { + // Replace slashes with dashes for URL processing + $date = str_replace('_', '/', $date); + } // Get user-preferred date format if ($this->session->userdata('user_date_format')) { $date_format = $this->session->userdata('user_date_format'); diff --git a/assets/js/sections/qso.js b/assets/js/sections/qso.js index 6a61c6e51..b3b5af6cb 100644 --- a/assets/js/sections/qso.js +++ b/assets/js/sections/qso.js @@ -830,9 +830,13 @@ $("#callsign").on("focusout", function () { } const json_mode = $("#mode").val(); - var find_callsign = $(this).val().toUpperCase(); - var callsign = find_callsign; - const startDate = encodeURIComponent($('#start_date').val()); + let find_callsign = $(this).val().toUpperCase(); + let callsign = find_callsign; + let startDate = $('#start_date').val(); + if (startDate.includes('/')) { + startDate = startDate.replaceAll('/', '_'); + } + startDate = encodeURIComponent(startDate); const stationProfile = $('#stationProfile').val(); find_callsign = find_callsign.replace(/\//g, "-");