Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0d8775c9
Commit
0d8775c9
authored
Mar 31, 2011
by
Vincent Povirk
Committed by
Alexandre Julliard
Mar 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: When entering a month or year, keep the day in range.
parent
4d1fca24
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
datetime.c
dlls/comctl32/datetime.c
+7
-1
No files found.
dlls/comctl32/datetime.c
View file @
0d8775c9
...
...
@@ -770,7 +770,7 @@ static void
DATETIME_ApplySelectedField
(
DATETIME_INFO
*
infoPtr
)
{
int
fieldNum
=
infoPtr
->
select
&
DTHT_DATEFIELD
;
int
i
,
val
=
0
;
int
i
,
val
=
0
,
clamp_day
=
0
;
SYSTEMTIME
date
=
infoPtr
->
date
;
if
(
infoPtr
->
select
==
-
1
||
infoPtr
->
nCharsEntered
==
0
)
...
...
@@ -785,14 +785,17 @@ DATETIME_ApplySelectedField (DATETIME_INFO *infoPtr)
case
ONEDIGITYEAR
:
case
TWODIGITYEAR
:
date
.
wYear
=
date
.
wYear
-
(
date
.
wYear
%
100
)
+
val
;
clamp_day
=
1
;
break
;
case
INVALIDFULLYEAR
:
case
FULLYEAR
:
date
.
wYear
=
val
;
clamp_day
=
1
;
break
;
case
ONEDIGITMONTH
:
case
TWODIGITMONTH
:
date
.
wMonth
=
val
;
clamp_day
=
1
;
break
;
case
ONEDIGITDAY
:
case
TWODIGITDAY
:
...
...
@@ -815,6 +818,9 @@ DATETIME_ApplySelectedField (DATETIME_INFO *infoPtr)
break
;
}
if
(
clamp_day
&&
date
.
wDay
>
MONTHCAL_MonthLength
(
date
.
wMonth
,
date
.
wYear
))
date
.
wDay
=
MONTHCAL_MonthLength
(
date
.
wMonth
,
date
.
wYear
);
if
(
DATETIME_SetSystemTime
(
infoPtr
,
GDT_VALID
,
&
date
))
DATETIME_SendDateTimeChangeNotify
(
infoPtr
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment