Issue #2035 Declare new parameters

We change min and max format date, now we expect `YYYY` or `YYYY-mm`or `YYYY-mm-dd`
This commit is contained in:
Willy "Linty
2023-11-10 14:40:08 +01:00
parent 1dfa5b0d30
commit a267cc022b
4 changed files with 26 additions and 16 deletions
+3 -3
View File
@@ -648,9 +648,9 @@ function advanced_filter_hide() {
let months = [];
function getDateStr(date) {
let date_arr = date.split(' ');
let curr_month = months[parseInt(date_arr[0]) - 1];
return curr_month + " " + date_arr[1]
let date_arr = date.split('-');
let curr_month = months[parseInt(date_arr[1]) - 1];
return curr_month + " " + date_arr[0]
}
function setupRegisterDates(register_dates) {
+1 -1
View File
@@ -53,7 +53,7 @@ $result = pwg_query($query);
$register_dates = array();
while ($row = pwg_db_fetch_assoc($result))
{
$register_dates[] = $row['registration_month'].' '.$row['registration_year'];
$register_dates[] = $row['registration_year'].'-'.sprintf('%02u', $row['registration_month']);
}
$template->assign('register_dates', implode(',' , $register_dates));