mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 05:29:37 +08:00
use readOnly
This commit is contained in:
parent
bec5d311a0
commit
94423f60f2
@ -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"
|
||||
|
@ -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}
|
||||
|
@ -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}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user