简体   繁体   中英

airbnb/react-dates - unable to edit / type in date fields

I am using airbnb/react-dates for user to select or type start and end date. However I am not able to edit date fields. I can select dates but not able to type into the date fields.

I tried reading below links but no luck so far https://github.com/airbnb/react-dates http://airbnb.io/react-dates/?selectedKind=DateRangePicker%20%28DRP%29&selectedStory=default&full=0&down=1&left=1&panelRight=0&downPanel=kadirahq%2Fstorybook-addon-actions%2Factions-panel https://github.com/airbnb/react-dates/issues/79

In my package.json I have "react-dates": "^12.6.0"

I am using below props and running it in Chrome.

<DateRangePicker
        className="clientsPaging"
        displayFormat={"YYYY-MM-DD"}
        startDate={this.state.startDate} // momentPropTypes.momentObj or null,
        endDate={this.state.endDate} // momentPropTypes.momentObj or null,
        onDatesChange={this.datesChanged} // PropTypes.func.isRequired,
        isOutsideRange={() => false}
        focusedInput={this.state.focusedInput} // PropTypes.oneOf([START_DATE, END_DATE]) or null,
        onFocusChange={focusedInput => this.setState({ focusedInput })} // PropTypes.func.isRequired,
      />

在此版本中,Cursor不可见,但是您仍然可以在该字段中编写。如果没有,请尝试将readOnlyfalse

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM