]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/calendar/calendar.cpp
Don't use a destroy event handler to disconnect the native control's delegate as...
[wxWidgets.git] / samples / calendar / calendar.cpp
index 493f42850dd12ceb6e9aaff2b0a39047aa535382..a6c6007c51f0ae800aaead0ff99a736936fe0728 100644 (file)
@@ -799,6 +799,18 @@ void MyPanel::LimitDateRange(bool on)
         if ( m_calendar->SetDateRange(today - diff, today + diff) )
         {
             wxLogStatus("Date range limited to 3 months around today.");
         if ( m_calendar->SetDateRange(today - diff, today + diff) )
         {
             wxLogStatus("Date range limited to 3 months around today.");
+            wxDateTime firstValidDate;
+            wxDateTime lastValidDate;
+            if ( m_calendar->GetDateRange(&firstValidDate, &lastValidDate) )
+            {
+                wxLogMessage("First valid date: %s, last valid date: %s",
+                             firstValidDate.FormatISODate(),
+                             lastValidDate.FormatISODate());
+            }
+            else
+            {
+                wxLogWarning("Failed to get back the valid dates range.");
+            }
         }
         else
         {
         }
         else
         {