mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-05 16:42:58 +00:00
Merge pull request #3053 from daboe01/CPDatePickerUsabilityImprovement
fixed: poor user experience when entering dates that are too high for…
This commit is contained in:
1 file changed
+12
@@ -385,6 +385,18 @@ CPAMPMDateType = 6;
|
||||
return;
|
||||
}
|
||||
|
||||
// if we enter a day that is too high for the current month
|
||||
// we need to increase the month by one
|
||||
// if we do not do this, the user input would be silently reset
|
||||
// very poor user experience
|
||||
|
||||
if (parseInt(anObjectValue, 10) > [dateValue _daysInMonth])
|
||||
{
|
||||
[_datePickerElementView._textFieldMonth setIntValue:(dateValue.getMonth() + 2)];
|
||||
[super setObjectValue:objectValue];
|
||||
return;
|
||||
}
|
||||
|
||||
[super setObjectValue:objectValue];
|
||||
break;
|
||||
|
||||
|
||||
Reference in new issue
Block a user