Fixed: CPDatePicker firstResponder issue

Previously, the textual datePicker didn't work because it couldn't become the firstResponder.
This PR fixed another issue as well. Previously it wasn't possible to modify a date when moving only with tab and when the datePicker came firstResponder with tabulation.
This commit is contained in:
Alexandre Wilhelm committed 2014-05-27 10:12:02 -07:00
1 parent 90c65c2927
commit 089d564934
2 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -533,7 +533,7 @@ CPEraDatePickerElementFlag = 0x0100;
{
if (_datePickerStyle == CPTextFieldAndStepperDatePickerStyle || _datePickerStyle == CPTextFieldDatePickerStyle)
{
if ([super becomeFirstResponder])
if (![super becomeFirstResponder])
return NO;
[_datePickerTextfield _selecteTextFieldWithFlags:[[CPApp currentEvent] modifierFlags]];
+7 -7
View File
@@ -1226,14 +1226,14 @@ var CPMonthDateType = 0,
CPTimer _timerEdition;
}
#pragma mark -
#pragma mark Getter Setter methods
- (BOOL)acceptFirstResponder
- (id)init
{
_firstEvent = YES;
return NO;
if (self = [super init])
{
_firstEvent = YES;
}
return self;
}
/*! Set the dateType of the textField