Browse Source

Keep "Today"-string when changing text color. (#83)

master
Henning Hall 6 years ago
committed by GitHub
parent
commit
98c23319ad
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 6 deletions
  1. +1
    -0
      DatePickerIOS.js
  2. +0
    -6
      ios/RNDatePicker/DatePicker.m

+ 1
- 0
DatePickerIOS.js View File

@ -139,6 +139,7 @@ export default class DatePickerIOS extends React.Component {
); );
return ( return (
<RCTDatePickerIOS <RCTDatePickerIOS
key={this.props.textColor} // preventing "Today" string keep old text color when text color changes
ref={picker => { ref={picker => {
this._picker = picker; this._picker = picker;
}} }}

+ 0
- 6
ios/RNDatePicker/DatePicker.m View File

@ -64,12 +64,6 @@
// Setting picker text color // Setting picker text color
[self setValue:UIColorFromRGB(intColor) forKeyPath:@"textColor"]; [self setValue:UIColorFromRGB(intColor) forKeyPath:@"textColor"];
SEL selector = NSSelectorFromString(@"setHighlightsToday:");
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[UIDatePicker instanceMethodSignatureForSelector:selector]];
BOOL no = NO;
[invocation setSelector:selector];
[invocation setArgument:&no atIndex:2];
[invocation invokeWithTarget:self];
} }

Loading…
Cancel
Save