if ( !MSWCreateControl(DATETIMEPICK_CLASS, wxEmptyString, pos, size) )
return false;
- if ( dt.IsValid() )
+ if ( dt.IsValid() || (style & wxDP_ALLOWNONE) )
SetValue(dt);
return true;
{
const int y = GetCharHeight();
- return wxSize(DEFAULT_ITEM_WIDTH, EDIT_HEIGHT_FROM_CHAR_HEIGHT(y));
+ wxSize best(DEFAULT_ITEM_WIDTH, EDIT_HEIGHT_FROM_CHAR_HEIGHT(y));
+ CacheBestSize(best);
+ return best;
}
// ----------------------------------------------------------------------------