From 1a3146cf85f4ecec5375b55061272a7c44e67d9d Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Wed, 10 Apr 2024 14:57:49 +0200 Subject: [PATCH] Set a default value for time range filter minimum --- src/BreCalClient/AboutDialog.xaml | 2 +- src/BreCalClient/SearchFilterControl.xaml.cs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/BreCalClient/AboutDialog.xaml b/src/BreCalClient/AboutDialog.xaml index 544c3cc..60c0183 100644 --- a/src/BreCalClient/AboutDialog.xaml +++ b/src/BreCalClient/AboutDialog.xaml @@ -25,7 +25,7 @@ - + diff --git a/src/BreCalClient/SearchFilterControl.xaml.cs b/src/BreCalClient/SearchFilterControl.xaml.cs index 4310ba0..2814c8e 100644 --- a/src/BreCalClient/SearchFilterControl.xaml.cs +++ b/src/BreCalClient/SearchFilterControl.xaml.cs @@ -72,7 +72,7 @@ namespace BreCalClient this.comboBoxAgencies.UnSelectAll(); this.comboBoxBerths.UnSelectAll(); this.comboBoxCategories.UnSelectAll(); - this.datePickerETAFrom.SelectedDate = null; + this.datePickerETAFrom.SelectedDate = DateTime.Now.AddDays(-2); this.datePickerETATo.SelectedDate = null; this.textBoxSearch.Clear(); this.upDownShiplengthFrom.Value = null; @@ -107,7 +107,10 @@ namespace BreCalClient if (sfm.SearchString != null) this.textBoxSearch.Text = sfm.SearchString; this.upDownShiplengthFrom.Value = sfm.ShipLengthFrom; this.upDownShiplengthTo.Value = sfm.ShipLengthTo; - this.datePickerETAFrom.SelectedDate = sfm.EtaFrom; + if (sfm.EtaFrom != null) + this.datePickerETAFrom.SelectedDate = sfm.EtaFrom; + else + this.datePickerETAFrom.SelectedDate = DateTime.Now.AddDays(-2); this.datePickerETATo.SelectedDate = sfm.EtaTo; this.checkBoxOwn.IsChecked = sfm.MineOnly;