use readOnly

This commit is contained in:
afc163 2016-06-15 17:49:16 +08:00
parent bec5d311a0
commit 94423f60f2
3 changed files with 3 additions and 7 deletions

View File

@ -123,7 +123,7 @@ export default class RangePicker extends React.Component {
<span className={props.pickerInputClass} disabled={disabled}>
<input
disabled={disabled}
onChange={props.handleInputChange}
readOnly
value={start ? props.getFormatter().format(start) : ''}
placeholder={startPlaceholder}
className="ant-calendar-range-picker-input"
@ -131,7 +131,7 @@ export default class RangePicker extends React.Component {
<span className="ant-calendar-range-picker-separator"> ~ </span>
<input
disabled={disabled}
onChange={props.handleInputChange}
readOnly
value={end ? props.getFormatter().format(end) : ''}
placeholder={endPlaceholder}
className="ant-calendar-range-picker-input"

View File

@ -92,7 +92,7 @@ export default function createPicker(TheCalendar) {
<span>
<input
disabled={props.disabled}
onChange={props.handleInputChange}
readOnly
value={value ? props.getFormatter().format(value) : ''}
placeholder={placeholder}
className={props.pickerInputClass}

View File

@ -24,9 +24,6 @@ export default function wrapPicker(Picker, defaultFormat) {
antLocale: PropTypes.object,
}
// remove input readonly warning
handleInputChange() {}
getLocale() {
const props = this.props;
let locale = defaultLocale;
@ -102,7 +99,6 @@ export default function wrapPicker(Picker, defaultFormat) {
locale={locale}
timePicker={timePicker}
toggleOpen={this.toggleOpen}
handleInputChange={this.handleInputChange}
getFormatter={this.getFormatter}
parseDateFromValue={this.parseDateFromValue}
/>