diff --git a/src/Models/ReportFile.cs b/src/Models/ReportFile.cs
index 7e6dc36..ddc4c19 100644
--- a/src/Models/ReportFile.cs
+++ b/src/Models/ReportFile.cs
@@ -23,7 +23,7 @@ class ReportFile : ChangeNotifier
public ReportFile(ReportFile other)
{
Title = _title = other.Title;
- ReceiptDateTime = _receiptDateTime = other.ReceiptDateTime;
+ ReceiptDateTime = _receiptDateTime = other.ReceiptDateTime ?? DateTime.Now;
Notes = _notes = other.Notes;
FilePath = _filePath = other.FilePath;
}
@@ -34,12 +34,12 @@ class ReportFile : ChangeNotifier
set { _title = value; NotifyPropertyChanged(); }
}
- public DateTime ReceiptDateTime
+ public DateTime? ReceiptDateTime
{
get => _receiptDateTime;
set
- {
- _receiptDateTime = value;
+ {
+ _receiptDateTime = value ?? DateTime.Now;
NotifyPropertyChanged();
NotifyPropertyChanged(nameof(ReceiptDate));
}
diff --git a/src/Views/MainView.axaml b/src/Views/MainView.axaml
index a5487a9..a61212c 100644
--- a/src/Views/MainView.axaml
+++ b/src/Views/MainView.axaml
@@ -136,7 +136,7 @@
+ Width="150">
@@ -167,6 +169,7 @@
@@ -175,7 +178,7 @@
+ Width="200">
Edit
@@ -193,6 +197,7 @@
CommandParameter="{Binding}"
Classes="Danger"
Margin="2"
+ FontSize="12"
IsEnabled="{Binding !$parent[UserControl].((vm:MainViewModel)DataContext).IsCreatingPDF}">
Remove