@@ -172,12 +172,12 @@ class DatePicker extends Component {
172
172
}
173
173
174
174
getTitleElement ( ) {
175
- const { date, placeholder, customStyles} = this . props ;
175
+ const { date, placeholder, customStyles, allowFontScaling } = this . props ;
176
176
177
177
if ( ! date && placeholder ) {
178
- return ( < Text style = { [ Style . placeholderText , customStyles . placeholderText ] } > { placeholder } </ Text > ) ;
178
+ return ( < Text allowFontScaling = { allowFontScaling } style = { [ Style . placeholderText , customStyles . placeholderText ] } > { placeholder } </ Text > ) ;
179
179
}
180
- return ( < Text style = { [ Style . dateText , customStyles . dateText ] } > { this . getDateStr ( ) } </ Text > ) ;
180
+ return ( < Text allowFontScaling = { allowFontScaling } style = { [ Style . dateText , customStyles . dateText ] } > { this . getDateStr ( ) } </ Text > ) ;
181
181
}
182
182
183
183
onDateChange ( date ) {
@@ -334,7 +334,8 @@ class DatePicker extends Component {
334
334
TouchableComponent,
335
335
testID,
336
336
cancelBtnTestID,
337
- confirmBtnTestID
337
+ confirmBtnTestID,
338
+ allowFontScaling
338
339
} = this . props ;
339
340
340
341
const dateInputStyle = [
@@ -402,6 +403,7 @@ class DatePicker extends Component {
402
403
testID = { cancelBtnTestID }
403
404
>
404
405
< Text
406
+ allowFontScaling = { allowFontScaling }
405
407
style = { [ Style . btnTextText , Style . btnTextCancel , customStyles . btnTextCancel ] }
406
408
>
407
409
{ cancelBtnText }
@@ -413,7 +415,7 @@ class DatePicker extends Component {
413
415
style = { [ Style . btnText , Style . btnConfirm , customStyles . btnConfirm ] }
414
416
testID = { confirmBtnTestID }
415
417
>
416
- < Text style = { [ Style . btnTextText , customStyles . btnTextConfirm ] } > { confirmBtnText } </ Text >
418
+ < Text allowFontScaling = { allowFontScaling } style = { [ Style . btnTextText , customStyles . btnTextConfirm ] } > { confirmBtnText } </ Text >
417
419
</ TouchableComponent >
418
420
</ Animated . View >
419
421
</ TouchableComponent >
@@ -443,6 +445,7 @@ DatePicker.defaultProps = {
443
445
// whether or not show the icon
444
446
showIcon : true ,
445
447
disabled : false ,
448
+ allowFontScaling : true ,
446
449
hideText : false ,
447
450
placeholder : '' ,
448
451
TouchableComponent : TouchableHighlight ,
@@ -465,6 +468,7 @@ DatePicker.propTypes = {
465
468
customStyles : PropTypes . object ,
466
469
showIcon : PropTypes . bool ,
467
470
disabled : PropTypes . bool ,
471
+ allowFontScaling : PropTypes . bool ,
468
472
onDateChange : PropTypes . func ,
469
473
onOpenModal : PropTypes . func ,
470
474
onCloseModal : PropTypes . func ,
0 commit comments