diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index 404dfe9..c9839a3 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -942,9 +942,9 @@ calendar_queue_refresh (GtkCalendar *calendar)
 }
 
 static void
-calendar_set_month_next (GtkCalendar *calendar)
+do_calendar_set_month_next (GtkCalendar *calendar,gboolean block_day_signals)
 {
-  gint month_len;
+  gint month_len,day;
   GtkCalendarPrivate *priv = calendar->priv;
 
   if (priv->display_flags & GTK_CALENDAR_NO_MONTH_CHANGE)
@@ -969,14 +969,20 @@ calendar_set_month_next (GtkCalendar *calendar)
   month_len = month_length[leap (priv->year)][priv->month + 1];
 
   if (month_len < priv->selected_day)
-    {
-      priv->selected_day = 0;
-      gtk_calendar_select_day (calendar, month_len);
-    }
-  else
-    gtk_calendar_select_day (calendar, priv->selected_day);
+    priv->selected_day=month_len;
 
-  calendar_queue_refresh (calendar);
+  if (!block_day_signals) {
+    day=priv->selected_day;
+    priv->selected_day=0;
+    gtk_calendar_select_day (calendar,day);
+    calendar_queue_refresh (calendar);
+  }
+}
+
+static void 
+calendar_set_month_next(GtkCalendar *calendar)
+{
+  do_calendar_set_month_next(calendar,FALSE);
 }
 
 static void
@@ -1340,10 +1346,10 @@ calendar_day_rectangle (GtkCalendar  *calendar,
 }
 
 static void
-calendar_set_month_prev (GtkCalendar *calendar)
+do_calendar_set_month_prev (GtkCalendar *calendar,gboolean block_day_signals)
 {
   GtkCalendarPrivate *priv = calendar->priv;
-  gint month_len;
+  gint month_len,day;
 
   if (priv->display_flags & GTK_CALENDAR_NO_MONTH_CHANGE)
     return;
@@ -1368,18 +1374,22 @@ calendar_set_month_prev (GtkCalendar *calendar)
                  0);
 
   if (month_len < priv->selected_day)
-    {
-      priv->selected_day = 0;
-      gtk_calendar_select_day (calendar, month_len);
-    }
-  else
-    {
-      if (priv->selected_day < 0)
-        priv->selected_day = priv->selected_day + 1 + month_length[leap (priv->year)][priv->month + 1];
-      gtk_calendar_select_day (calendar, priv->selected_day);
-    }
+    priv->selected_day = month_len;
+  else if (priv->selected_day < 0)
+    priv->selected_day = priv->selected_day + 1 + month_length[leap (priv->year)][priv->month + 1];
 
-  calendar_queue_refresh (calendar);
+   if (!block_day_signals) {
+    day=priv->selected_day;
+    priv->selected_day=0;
+    gtk_calendar_select_day (calendar, day);
+    calendar_queue_refresh (calendar);
+  }
+}
+
+static void 
+calendar_set_month_prev(GtkCalendar *calendar)
+{
+  do_calendar_set_month_prev(calendar,FALSE);
 }
 
 
@@ -2978,9 +2988,9 @@ calendar_main_button_press (GtkCalendar    *calendar,
       day = priv->day[row][col];
 
       if (day_month == MONTH_PREV)
-        calendar_set_month_prev (calendar);
+        do_calendar_set_month_prev (calendar,TRUE);
       else if (day_month == MONTH_NEXT)
-        calendar_set_month_next (calendar);
+        do_calendar_set_month_next (calendar,TRUE);
 
       if (!gtk_widget_has_focus (widget))
         gtk_widget_grab_focus (widget);
@@ -2993,6 +3003,9 @@ calendar_main_button_press (GtkCalendar    *calendar,
         }
 
       calendar_select_and_focus_day (calendar, day);
+
+      if ((day_month == MONTH_PREV) || (day_month == MONTH_NEXT))
+	calendar_queue_refresh (calendar);
     }
   else if (event->type == GDK_2BUTTON_PRESS)
     {
@@ -3310,11 +3323,14 @@ gtk_calendar_key_press (GtkWidget   *widget,
 
           day = priv->day[row][col];
           if (priv->day_month[row][col] == MONTH_PREV)
-            calendar_set_month_prev (calendar);
+            do_calendar_set_month_prev (calendar,TRUE);
           else if (priv->day_month[row][col] == MONTH_NEXT)
-            calendar_set_month_next (calendar);
+            do_calendar_set_month_next (calendar,TRUE);
 
           calendar_select_and_focus_day (calendar, day);
+
+	  if ((priv->day_month[row][col] == MONTH_PREV) || (priv->day_month[row][col] == MONTH_NEXT))
+	    calendar_queue_refresh (calendar);
         }
     }
 
