summaryrefslogtreecommitdiffabout
path: root/microkde/kdatetbl.cpp
Side-by-side diff
Diffstat (limited to 'microkde/kdatetbl.cpp') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kdatetbl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/microkde/kdatetbl.cpp b/microkde/kdatetbl.cpp
index 146291b..508ce31 100644
--- a/microkde/kdatetbl.cpp
+++ b/microkde/kdatetbl.cpp
@@ -343,8 +343,9 @@ KDateTable::contentsMousePressEvent(QMouseEvent *e)
{ // the user clicked on the frame of the table
return;
}
pos=7*(row-1)+col+1;
+#if 0
if(pos+dayoff<=firstday)
{ // this day is in the previous month
KNotifyClient::beep();
return;
@@ -353,10 +354,12 @@ KDateTable::contentsMousePressEvent(QMouseEvent *e)
{ // this date is in the next month
KNotifyClient::beep();
return;
}
+#endif
temp=firstday+date.day()-dayoff-1;
- setDate(QDate(date.year(), date.month(), pos-firstday+dayoff));
+ QDate da = QDate(date.year(), date.month(),1);
+ setDate(da.addDays( pos-firstday+dayoff-1));
updateCell(temp/7+1, temp%7); // Update the previously selected cell
updateCell(row, col); // Update the selected cell
// assert(QDate(date.year(), date.month(), pos-firstday+dayoff).isValid());
emit(tableClicked());