Permalink
Browse files

Fixed: when DatePicker setDate was called, the stepper value was set …

…to the value of each segment in turn. This caused bugs such as the stepper taking on the current year as its value when the day was the active segment, which in turn caused the day to roll over to 1 the next time the stepper up arrow was pressed. The fix is to only update the stepper with the active value when setDate is called.
  • Loading branch information...
aljungberg authored and Me1000 committed Feb 5, 2010
1 parent 569ce8c commit 45b0125389693131ea02cfbc3e4b1cc75d96cfe3
Showing with 6 additions and 3 deletions.
  1. +6 −3 DatePicker.j
View
@@ -832,10 +832,13 @@ CPLogRegister(CPLogConsole);
{
[super setStringValue:aValue];
- [[superController _theStepper] setDoubleValue:[self intValue]];
+ if ([inputManager activeDateSegment] === self)
+ {
+ [[superController _theStepper] setDoubleValue:[self intValue]];
- if([self dateType] == 10 && [self stringValue] == @"PM"){
- [[superController _theStepper] setDoubleValue:1];
+ if([self dateType] == 10 && [self stringValue] == @"PM"){
+ [[superController _theStepper] setDoubleValue:1];
+ }
}
}

0 comments on commit 45b0125

Please sign in to comment.