CXTPPropertyGridItemDate doubt |
Post Reply |
Author | |
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Posted: 05 August 2009 at 9:37am |
XTP 13.1.
I don't like the initialization of "m_strFormat".
void CXTPPropertyGridItemDate::Init(const COleDateTime& oleDate)
{ m_nFlags = xtpGridItemHasComboButton | xtpGridItemHasEdit; m_strFormat = _T("%d/%m/%Y"); } That's not the desired format on many platforms! Instead, you usually want to format like this:
date.Format(VAR_DATEVALUEONLY)
This is not possible with your current implementation. I suggest you make this the default.
|
|
PokerMemento - http://www.pokermemento.com/
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
It's a bug!
return oleDate.Format();
should be
return oleDate.Format(VAR_DATEVALUEONLY);
Otherwise the formatting is erroneous. E.g. with my Swedish setting the date should be formatted as YYYY-mm-dd, but with your code I keep getting YYYY/mm/dd. |
|
PokerMemento - http://www.pokermemento.com/
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |