From: John L. <jla...@gm...> - 2012-05-17 19:51:15
|
On Thu, May 17, 2012 at 3:00 PM, Milind Gupta <mil...@gm...> wrote: > Hi, > I have a wxDatePickerCtrl where I set Allow None in the property > (wxDP_ALLOWNONE) and it shows me a checkbox. If the checkbox is unchecked > the control is grayed out. But with it unchecked if I query the GetValue I > do not get a invalid date. I am getting 12/31/1969 which is not invalid. Am > I doing something wrong here? > Is this available in any example? Is it a wxWidgets issue? What version of wxLua are you using? The precompiled one on Sourceforge? Note that in GTK (Linux) using the samples/picker.wx.lua sample I do not even see the checkbox. After googling a bit it seems like this is the case and that people are simply creating their own checkbox, putting it next to the date picker, and calling Enable() on the date picker as appropriate. You then query the checkbox to see if the date is "valid" or not. In MSW using wxWidgets 2.9 the control does return an invalid wxDateTime so it looks like this has been fixed. Regards, John |