@@ -149,14 +182,16 @@
$starts_field = $key . "_starts_at";
$coptions['class'] = 'form-control datepicker';
$coptions['label'] = 'Starts at:';
- $coptions['placeholder'] = 'YYYY-MM-DD HH:MM:SS'; // TODO: test for date-only inputs and send only the date
+ $coptions['required'] = false;
+ $coptions['placeholder'] = 'YYYY-MM-DD HH:MM:SS';
$coptions['id'] = $starts_field;
$pickerDate = '';
if(!empty($query[$starts_field])) {
+ $starts_date = \Cake\I18n\FrozenTime::parse($query[$starts_field]);
// Adjust the time back to the user's timezone
- $coptions['value'] = $query[$starts_field]->i18nFormat("yyyy-MM-dd HH:mm:ss", $this->get('vv_tz'));
- $pickerDate = $query[$starts_field]->i18nFormat("yyyy-MM-dd", $this->get('vv_tz'));
+ $coptions['value'] = $starts_date->i18nFormat("yyyy-MM-dd HH:mm:ss", $this->get('vv_tz'));
+ $pickerDate = $starts_date->i18nFormat("yyyy-MM-dd", $this->get('vv_tz'));
}
$date_args = [
@@ -178,15 +213,17 @@
// accessibility purposes.
$ends_field = $key . "_ends_at";
$coptions['class'] = 'form-control datepicker';
- $coptions['label'] = 'Ends at:';
+ $coptions['required'] = false;
$coptions['placeholder'] = 'YYYY-MM-DD HH:MM:SS'; // TODO: test for date-only inputs and send only the date
+ $coptions['label'] = 'Ends at:';
$coptions['id'] = $ends_field;
$pickerDate = '';
if(!empty($query[$ends_field])) {
// Adjust the time back to the user's timezone
- $coptions['value'] = $query[$ends_field]->i18nFormat("yyyy-MM-dd HH:mm:ss", $this->get('vv_tz'));
- $pickerDate = $query[$ends_field]->i18nFormat("yyyy-MM-dd", $this->get('vv_tz'));
+ $ends_date = \Cake\I18n\FrozenTime::parse($query[$ends_field]);
+ $coptions['value'] = $ends_date->i18nFormat("yyyy-MM-dd HH:mm:ss", $this->get('vv_tz'));
+ $pickerDate = $ends_date->i18nFormat("yyyy-MM-dd", $this->get('vv_tz'));
}
$date_args = [
@@ -215,7 +252,8 @@
print $this->Form->checkbox($key, [
'class' => 'form-check-input',
'checked' => $query[$key] ?? 0,
- 'hiddenField' => false
+ 'hiddenField' => false,
+ 'required' => false
]);
?>
diff --git a/app/webroot/css/co-responsive.css b/app/webroot/css/co-responsive.css
index b80bc40d0..e036179b3 100644
--- a/app/webroot/css/co-responsive.css
+++ b/app/webroot/css/co-responsive.css
@@ -192,7 +192,7 @@
margin-bottom: 0;
}
/* TOP SEARCH */
- #top-filters-fields-subgroups {
+ .top-filters-fields-subgroups {
display: grid;
grid-template-columns: 1fr 1fr;
column-gap: 1em;