提交 5b65625a 编写于 作者: A afc163

fix placeholder again

上级 e42729f1
......@@ -13,7 +13,6 @@ function createPicker(TheCalendar) {
getDefaultProps() {
return {
format: 'yyyy-MM-dd',
placeholder: '',
transitionName: 'slide-up',
popupStyle: {},
onSelect: null, // 向前兼容
......@@ -94,7 +93,8 @@ function createPicker(TheCalendar) {
let defaultCalendarValue = new GregorianCalendar(this.getLocale());
defaultCalendarValue.setTime(Date.now());
const placeholder = this.props.placeholder || this.getLocale().lang.placeholder;
const placeholder = ('placeholder' in this.props)
? this.placeholder : this.getLocale().lang.placeholder;
const calendar = (
<TheCalendar
disabledDate={this.props.disabledDate}
......
......@@ -8,7 +8,6 @@ const AntTimepicker = React.createClass({
getDefaultProps() {
return {
format: 'HH:mm:ss',
placeholder: '',
prefixCls: 'ant-timepicker',
onChange() {},
locale: {},
......@@ -67,7 +66,8 @@ const AntTimepicker = React.createClass({
render() {
const { format } = this.props;
const formatter = new DateTimeFormat(format);
const placeholder = this.props.placeholder || this.getLocale().lang.placeholder;
const placeholder = ('placeholder' in this.props)
? this.props.placeholder : this.getLocale().lang.placeholder;
return (
<TimePicker
{...this.props}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册