diff --git a/src/time-picker/time-picker-dialog.jsx b/src/time-picker/time-picker-dialog.jsx
index 4eab3c0a1715dc..dbeae407cdae7f 100644
--- a/src/time-picker/time-picker-dialog.jsx
+++ b/src/time-picker/time-picker-dialog.jsx
@@ -17,6 +17,7 @@ const TimePickerDialog = React.createClass({
onAccept: React.PropTypes.func,
onDismiss: React.PropTypes.func,
onShow: React.PropTypes.func,
+ wordings: React.PropTypes.object,
},
contextTypes: {
@@ -30,6 +31,15 @@ const TimePickerDialog = React.createClass({
mixins: [StylePropable, WindowListenable],
+ getDefaultProps() {
+ return {
+ wordings: {
+ ok: 'OK',
+ cancel: 'Cancel',
+ },
+ };
+ },
+
getInitialState() {
return {
open: false,
@@ -95,6 +105,7 @@ const TimePickerDialog = React.createClass({
onAccept,
format,
autoOk,
+ wordings,
...other,
} = this.props;
@@ -114,18 +125,23 @@ const TimePickerDialog = React.createClass({
let actions = [
,
- ,
];
+ if (!autoOk) {
+ actions.push(
+
+ );
+ }
+
const onClockChangeMinutes = (autoOk === true ? this._handleOKTouchTap : undefined);
return (
diff --git a/src/time-picker/time-picker.jsx b/src/time-picker/time-picker.jsx
index 4e51866159cf4d..384c4d9ce73139 100644
--- a/src/time-picker/time-picker.jsx
+++ b/src/time-picker/time-picker.jsx
@@ -79,6 +79,11 @@ const TimePicker = React.createClass({
* Override the inline-styles of TimePicker's TextField element.
*/
textFieldStyle: React.PropTypes.object,
+
+ /**
+ * Wordings used inside the button of the dialog.
+ */
+ wordings: React.PropTypes.object,
},
contextTypes: {
@@ -189,6 +194,7 @@ const TimePicker = React.createClass({
onShow,
onDismiss,
style,
+ wordings,
textFieldStyle,
...other,
} = this.props;
@@ -212,6 +218,7 @@ const TimePicker = React.createClass({
onShow={onShow}
onDismiss={onDismiss}
format={format}
+ wordings={wordings}
autoOk={autoOk}
/>