From ad40c15cccf52dc08e90f3c92cfea4e6f0afa778 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 30 Sep 2009 01:56:49 +0400 Subject: [PATCH] comctl32/datetime: If we already have a 4 digit year reset it on first char typed. --- dlls/comctl32/datetime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index 559509a218f..224519afc58 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -970,7 +970,8 @@ DATETIME_Char (DATETIME_INFO *infoPtr, WPARAM vkCode) break; case INVALIDFULLYEAR: case FULLYEAR: - date->wYear = (date->wYear%1000)*10 + num; + /* reset current year initialy */ + date->wYear = ((date->wYear/1000) ? 0 : 1)*(date->wYear%1000)*10 + num; date->wDayOfWeek = DATETIME_CalculateDayOfWeek( date->wDay,date->wMonth,date->wYear); DATETIME_SendDateTimeChangeNotify (infoPtr);