This is similar to the fix of r64208 for wxCalendarCtrl and ignores the time
component of SYSTEMTIME objects returned by the native functions in
wxDatePickerCtrl too to ensure that we operate with pure dates only.
Closes #12493.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65573
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
SYSTEMTIME st;
if ( DateTime_GetSystemtime(GetHwnd(), &st) == GDT_VALID )
{
SYSTEMTIME st;
if ( DateTime_GetSystemtime(GetHwnd(), &st) == GDT_VALID )
{
- dt.SetFromMSWSysTime(st);
+ dt.SetFromMSWSysDate(st);
}
wxASSERT_MSG( m_date.IsValid() == dt.IsValid() &&
}
wxASSERT_MSG( m_date.IsValid() == dt.IsValid() &&
if ( dt1 )
{
if ( flags & GDTR_MIN )
if ( dt1 )
{
if ( flags & GDTR_MIN )
- dt1->SetFromMSWSysTime(st[0]);
+ dt1->SetFromMSWSysDate(st[0]);
else
*dt1 = wxDefaultDateTime;
}
else
*dt1 = wxDefaultDateTime;
}
if ( dt2 )
{
if ( flags & GDTR_MAX )
if ( dt2 )
{
if ( flags & GDTR_MAX )
- dt2->SetFromMSWSysTime(st[1]);
+ dt2->SetFromMSWSysDate(st[1]);
else
*dt2 = wxDefaultDateTime;
}
else
*dt2 = wxDefaultDateTime;
}
NMDATETIMECHANGE *dtch = (NMDATETIMECHANGE *)hdr;
wxDateTime dt;
if ( dtch->dwFlags == GDT_VALID )
NMDATETIMECHANGE *dtch = (NMDATETIMECHANGE *)hdr;
wxDateTime dt;
if ( dtch->dwFlags == GDT_VALID )
- dt.SetFromMSWSysTime(dtch->st);
+ dt.SetFromMSWSysDate(dtch->st);
// filter out duplicate DTN_DATETIMECHANGE events which the native
// control sends us when using wxDP_DROPDOWN style
// filter out duplicate DTN_DATETIMECHANGE events which the native
// control sends us when using wxDP_DROPDOWN style