]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/calendar/calendar.cpp
fix couple of typos
[wxWidgets.git] / samples / calendar / calendar.cpp
index 493f42850dd12ceb6e9aaff2b0a39047aa535382..74963223326f6e3fc7b4b0e08df983f3b2532160 100644 (file)
@@ -347,7 +347,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
        : wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size)
 {
     // set the frame icon
-    SetIcon(wxIcon(sample_xpm));
+    SetIcon(wxICON(sample));
 
     // create a menu bar
     wxMenu *menuFile = new wxMenu;
@@ -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.");
+            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
         {