Browse files

added datePickerDidLoseFocus delegate method. (untested)

  • Loading branch information...
1 parent f84660b commit 50070e0526aba699480446f8a47348eee690bf86 @Me1000 Me1000 committed Oct 10, 2009
Showing with 5 additions and 0 deletions.
  1. +5 −0 DatePicker.j
View
5 DatePicker.j
@@ -131,6 +131,10 @@ CPLogRegister(CPLogConsole);
if ([_delegate respondsToSelector:@selector(datePickerDidChange:)]){
[defaultCenter addObserver:_delegate selector:@selector(datePickerDidChange:) name:"datePickerDidChangeNotification" object:self];
}
+
+ if ([_delegate respondsToSelector:@selector(datePickerDidLoseFocus:)]){
+ [defaultCenter addObserver:_delegate selector:@selector(datePickerDidLoseFocus:) name:"datePickerDidLoseFocusNotification" object:self];
+ }
}
//this method doesn't actually work... yet...
@@ -363,6 +367,7 @@ CPLogRegister(CPLogConsole);
//[[self window] sendEvent:anEvent]; //it doesn't work unless the event is sent twice... idk why.
[self setActiveDateSegment:nil];
//_dontsetfirsttome = NO;
+ [[CPNotificationCenter defaultCenter] postNotificationName:"datePickerDidLoseFocusNotification" object:superController userInfo:nil];
return YES;
}

0 comments on commit 50070e0

Please sign in to comment.