diff --git a/src/widget/form/loadhistorydialog.cpp b/src/widget/form/loadhistorydialog.cpp index 3d7e36535..33c33bcc5 100644 --- a/src/widget/form/loadhistorydialog.cpp +++ b/src/widget/form/loadhistorydialog.cpp @@ -32,5 +32,11 @@ LoadHistoryDialog::~LoadHistoryDialog() QDateTime LoadHistoryDialog::getFromDate() { QDateTime res(ui->fromDate->selectedDate()); + if (res.date().month() != ui->fromDate->monthShown() || res.date().year() != ui->fromDate->yearShown()) + { + QDate newDate(ui->fromDate->yearShown(), ui->fromDate->monthShown(), 1); + res.setDate(newDate); + } + return res; }