21 #include "ui_loadhistorydialog.h" 
   26 #include <QCalendarWidget> 
   28 #include <QTextCharFormat> 
   36     highlightDates(QDate::currentDate().year(), QDate::currentDate().month());
 
   37     connect(
ui->fromDate, &QCalendarWidget::currentPageChanged, 
this,
 
   55 #if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) 
   56     QDateTime res(
ui->fromDate->selectedDate().startOfDay());
 
   58     QDateTime res(
ui->fromDate->selectedDate());
 
   60     if (res.date().month() != 
ui->fromDate->monthShown()
 
   61         || res.date().year() != 
ui->fromDate->yearShown()) {
 
   62         QDate newDate(
ui->fromDate->yearShown(), 
ui->fromDate->monthShown(), 1);
 
   71     setWindowTitle(title);
 
   76     ui->fromLabel->setText(info);
 
   81     QDate monthStart(year, month, 1);
 
   82     QDate monthEnd(year, month + 1, 1);
 
   87     QTextCharFormat format;
 
   88     format.setFontWeight(QFont::Bold);
 
   90     QCalendarWidget* calendar = 
ui->fromDate;
 
   91     for (
const auto& item : dateIdxs) {
 
   92         if (item.date < monthEnd) {
 
   93             calendar->setDateTextFormat(item.date, format);