Hi,

Checked out how this works across wxMSW, wxGTK and wxMAC.

The following does what you want on all platforms:

my $dpick = Wx::DatePickerCtrl->new(
    $parent,
    -1,
    Wx::DateTime->new(),
    wxDefaultPosition,
    wxDefaultSize,
    wxDP_ALLOWNONE
);
my $date = Wx::DateTime->new();
$dpick->SetValue($date);

.......
.......

# get the value

my $newdate = $dpick->GetDate;
my $invaliddate = Wx::DateTime->new();
my $dateisvalid = ($newdate->IsEqualTo($invalidate)) ? 0 : 1;


Using ->SetValue after the constructor gets you what you want.


Regards

Mark


Reply via email to