diff --git a/docs/src/pages/api/DayPickerInput.js b/docs/src/pages/api/DayPickerInput.js index 34b932c1e5..e1b963b309 100644 --- a/docs/src/pages/api/DayPickerInput.js +++ b/docs/src/pages/api/DayPickerInput.js @@ -64,40 +64,16 @@ export default () => ( component string | React.Component = "input"

The component class to render the input field.

+ {` } />`} +

- The component must be compatible with the standard HTML{' '} - input: i.e. it should support the + The component must support the onChange, onFocus, onKeyUp,{' '} - onClick and onBlur props, and the{' '} + onClick and onBlur props. If you want to keep + the focus when the user picks a day, the component class must have a{' '} focus method.

-

- If your custom component doesn’t support such props, wrap it in a - component contaning them. For example: -

- {`import React from 'react'; -import { DayPickerInput } from 'react-day-picker'; -import MyInputWithoutFocus from './MyInputWithoutFocus'; - -class MyInputWithFocus extends React.Component { - focus = () => { - this.input.focus(); - } - render() { - return ( - (this.input = el)} - {...this.props} - /> - ); - } -} - -function MyDayPickerInput(props) { - return -} -`} -

dayPickerProps Object