]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/datetimectrl.mm
Add wxTimer::StartOnce().
[wxWidgets.git] / src / osx / cocoa / datetimectrl.mm
index 4e8a44e894257cefe362c1ce14435c3585a8d546..263a8aa6e8cf78231c73a242079e6f061aac210b 100644 (file)
@@ -78,7 +78,12 @@ public:
 
     virtual void SetDateTime(const wxDateTime& dt)
     {
-        [View() setDateValue: NSDateFromWX(dt)];
+        wxDateTime dtFrom, dtTo;
+        
+        if ( GetDateRange(&dtFrom,&dtTo) == false ||
+            ( (!dtFrom.IsValid() || dtFrom <= dt) &&
+             (!dtTo.IsValid() || dt <= dtTo ) ) )
+            [View() setDateValue: NSDateFromWX(dt)];
     }
 
     virtual wxDateTime GetDateTime() const
@@ -172,7 +177,9 @@ wxDateTimeWidgetImpl::CreateDateTimePicker(wxDateTimePickerCtrl* wxpeer,
     }
 
     wxDateTimeWidgetImpl* c = new wxDateTimeWidgetCocoaImpl(wxpeer, v);
+#if !wxOSX_USE_NATIVE_FLIPPED
     c->SetFlipped(false);
+#endif
     return c;
 }