comctl32/monthcal: Check both min and max ranges in IsDateInValidRange.
This commit is contained in:
parent
e3ab993647
commit
72f174192b
|
@ -353,16 +353,19 @@ static BOOL MONTHCAL_IsDateInValidRange(const MONTHCAL_INFO *infoPtr,
|
|||
else if(MONTHCAL_CompareSystemTime(date, &min_allowed_date) == -1) {
|
||||
fix_st = &min_allowed_date;
|
||||
}
|
||||
else if(infoPtr->rangeValid & GDTR_MAX) {
|
||||
else {
|
||||
if(infoPtr->rangeValid & GDTR_MAX) {
|
||||
if((MONTHCAL_CompareSystemTime(date, &infoPtr->maxDate) == 1)) {
|
||||
fix_st = &infoPtr->maxDate;
|
||||
}
|
||||
}
|
||||
else if(infoPtr->rangeValid & GDTR_MIN) {
|
||||
|
||||
if(infoPtr->rangeValid & GDTR_MIN) {
|
||||
if((MONTHCAL_CompareSystemTime(date, &infoPtr->minDate) == -1)) {
|
||||
fix_st = &infoPtr->minDate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fix && fix_st) {
|
||||
date->wYear = fix_st->wYear;
|
||||
|
|
Loading…
Reference in New Issue