@@ -65,7 +65,7 @@ class DatePicker extends Component {
65
65
* @return {Object } JSX对象
66
66
*/
67
67
render ( ) {
68
- const { min, max, theme, dateFormat } = this . props ;
68
+ const { min, max, theme, dateFormat, confirmText , cancelText } = this . props ;
69
69
const value = this . state . value ;
70
70
const themeClassName =
71
71
[ 'default' , 'dark' , 'ios' , 'android' , 'android-dark' ] . indexOf ( theme ) === - 1 ?
@@ -101,10 +101,10 @@ class DatePicker extends Component {
101
101
< div className = "datepicker-navbar" >
102
102
< a
103
103
className = "datepicker-navbar-btn"
104
- onClick = { this . handleFinishBtnClick } > 完成 </ a >
104
+ onClick = { this . handleFinishBtnClick } > { confirmText } </ a >
105
105
< a
106
106
className = "datepicker-navbar-btn"
107
- onClick = { this . props . onCancel } > 取消 </ a >
107
+ onClick = { this . props . onCancel } > { cancelText } </ a >
108
108
</ div >
109
109
</ div >
110
110
) ;
@@ -117,6 +117,8 @@ DatePicker.propTypes = {
117
117
min : PropTypes . object ,
118
118
max : PropTypes . object ,
119
119
dateFormat : PropTypes . array ,
120
+ confirmText : PropTypes . string ,
121
+ cancelText : PropTypes . string ,
120
122
onSelect : PropTypes . func ,
121
123
onCancel : PropTypes . func ,
122
124
} ;
0 commit comments