mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Merge pull request #2347 from agrif/comma-dates
fix QSO panel when using a date format with commas
This commit is contained in:
@@ -77,10 +77,14 @@ class Logbook extends CI_Controller {
|
||||
|
||||
// Normalize the date only if it's not empty
|
||||
if (!empty($date)) {
|
||||
// Characters '/' and ',' are not URL safe, so we replace
|
||||
// them with '_' and '%'. Switch them back here.
|
||||
if (strpos($date, '_') !== false) {
|
||||
// Replace slashes with dashes for URL processing
|
||||
$date = str_replace('_', '/', $date);
|
||||
}
|
||||
if (strpos($date, '%') !== false) {
|
||||
$date = str_replace('%', ',', $date);
|
||||
}
|
||||
// Get user-preferred date format
|
||||
if ($this->session->userdata('user_date_format')) {
|
||||
$date_format = $this->session->userdata('user_date_format');
|
||||
|
||||
@@ -911,9 +911,14 @@ $("#callsign").on("focusout", function () {
|
||||
let find_callsign = $(this).val().toUpperCase();
|
||||
let callsign = find_callsign;
|
||||
let startDate = $('#start_date').val();
|
||||
// Characters '/' and ',' are not URL safe, so we replace
|
||||
// them with '_' and '%'.
|
||||
if (startDate.includes('/')) {
|
||||
startDate = startDate.replaceAll('/', '_');
|
||||
}
|
||||
if (startDate.includes(',')) {
|
||||
startDate = startDate.replaceAll(',', '%');
|
||||
}
|
||||
startDate = encodeURIComponent(startDate);
|
||||
const stationProfile = $('#stationProfile').val();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user