comctl32/datetime: If we already have a 4 digit year reset it on first char typed.

This commit is contained in:
Nikolay Sivov 2009-09-30 01:56:49 +04:00 committed by Alexandre Julliard
parent 916017d420
commit ad40c15ccc
1 changed files with 2 additions and 1 deletions

View File

@ -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);