[wxPython-users] wx.DatePickerCtrl

1beast at comcast.net 1beast at comcast.net
Fri May 25 11:27:58 PDT 2007


Frank Niessink wrote:
> Hi Tom,
>
> 2007/5/25, Tom Keating <1beast at comcast.net>:
>> I am new to wx.python and programming in general.  It is going fairly well but
>> I am trying to set up a search form where one of the optional parameters is a
>> date field.  I like the look of the wx.DatePickerCtrl but I can't figure out if
>> it is possible to place it on a form without it preselecting a date.
>
> There's the wx.DP_ALLOWNONE style. According to the docs, "With this
> style, the control allows the user to not enter any valid date at all.
> Without it - the default - the control always has some valid date."
>
> HTH, Frank
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
>
I got the following error:

 C:\Python\_spe\test\hotelTestMain4.py
Traceback (most recent call last):
 File "C:\Python\_spe\test\hotelTestMain4.py", line 2436, in
app = MyApp(0)
 File "c:\python\lib\site-packages\wx-2.8-msw-ansi\wx\_core.py", line 7757, in __init__
self._BootstrapApp()
 File "c:\python\lib\site-packages\wx-2.8-msw-ansi\wx\_core.py", line 7354, in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
 File "C:\Python\_spe\test\hotelTestMain4.py", line 2431, in OnInit
frame = MainScreen(None, -1, 'Hotel Main Menu')
 File "C:\Python\_spe\test\hotelTestMain4.py", line 680, in __init__
self.book.AddPage(self.CreatePage4(caption), caption, True, -1)
 File "C:\Python\_spe\test\hotelTestMain4.py", line 1660, in CreatePage4
self.arrivalCal = wx.DatePickerCtrl(datePanel, size=(120,-1),style=wx.DP_DROPDOWN | wx.DP_SHOWCENTURY | wx.DP_ALLOWNONE)
 File "c:\python\lib\site-packages\wx-2.8-msw-ansi\wx\_controls.py", line 6381, in __init__
_controls_.DatePickerCtrl_swiginit(self,_controls_.new_DatePickerCtrl(*args, **kwargs))
wx._core.PyAssertionError: C++ assertion "IsValid()" failed at ..\..\include\wx/datetime.h(1675) in wxDateTime::GetTicks(): invalid wxDateTime


I am running Windows 2000 sp4, wxPython 2.8.1 and I believe Python2.6




More information about the wxpython-users mailing list