Skip to content

Commit 36006f7

Browse files
author
Alican Salor
committed
Adding accessibilityLabel to props
1 parent c0cbd33 commit 36006f7

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

datepicker.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ class DatePicker extends Component {
332332
cancelBtnText,
333333
confirmBtnText,
334334
TouchableComponent,
335+
accessibilityLabel,
335336
testID,
336337
cancelBtnTestID,
337338
confirmBtnTestID,
@@ -351,7 +352,7 @@ class DatePicker extends Component {
351352
underlayColor={'transparent'}
352353
onPress={this.onPressDate}
353354
testID={testID}
354-
accessibilityLabel={testID}>
355+
accessibilityLabel={accessibilityLabel}>
355356
<View style={[Style.dateTouchBody, customStyles.dateTouchBody]}>
356357
{
357358
!this.props.hideText ?
@@ -399,8 +400,7 @@ class DatePicker extends Component {
399400
underlayColor={'transparent'}
400401
onPress={this.onPressCancel}
401402
style={[Style.btnText, Style.btnCancel, customStyles.btnCancel]}
402-
testID={cancelBtnTestID}
403-
accessibilityLabel={cancelBtnTestID}>
403+
testID={cancelBtnTestID}>
404404
<Text
405405
allowFontScaling={allowFontScaling}
406406
style={[Style.btnTextText, Style.btnTextCancel, customStyles.btnTextCancel]}>
@@ -411,8 +411,7 @@ class DatePicker extends Component {
411411
underlayColor={'transparent'}
412412
onPress={this.onPressConfirm}
413413
style={[Style.btnText, Style.btnConfirm, customStyles.btnConfirm]}
414-
testID={confirmBtnTestID}
415-
accessibilityLabel={confirmBtnTestID}>
414+
testID={confirmBtnTestID}>
416415
<Text allowFontScaling={allowFontScaling}
417416
style={[Style.btnTextText, customStyles.btnTextConfirm]}>
418417
{confirmBtnText}
@@ -478,7 +477,9 @@ DatePicker.propTypes = {
478477
modalOnResponderTerminationRequest: PropTypes.func,
479478
is24Hour: PropTypes.bool,
480479
getDateStr: PropTypes.func,
481-
locale: PropTypes.string
480+
locale: PropTypes.string,
481+
accessibilityLabel: PropTypes.string,
482+
testID: PropTypes.string
482483
};
483484

484485
export default DatePicker;

0 commit comments

Comments
 (0)