我正在使用 React-Day-Picker 和 react-redux-form。我需要能够隐藏移动键盘 - 这是一个响应式应用程序。这是我的代码的摘录。我不确定在哪里/如何实现这一点,而在桌面上没有 DayPickerInput 消失。
import {Control, Errors, actions} from 'react-redux-form'
import DayPickerInput from 'react-day-picker/DayPickerInput'
...other code here...
const DateInput = (props) => <DayPickerInput
value = {modelValue === 0 ? "Select date..." : new Date(modelValue)}
format = "ddd, D MMMM YYYY"
formatDate={formatDate}
parseDate={parseDate}
onDayChange={day => {let newValue = (day && day.valueOf()) || new Date().valueOf(); dispatch(actions.change(model, newValue))} }
dayPickerProps= {{firstDayOfWeek: 1, showOutsideDays:true}}/>
return(
<Control model={model}
className={style}
component={DateInput}
validators={validation}
validateOn="change"
disabled={disabled} type="text" readOnly>
</Control>
)
亲切的问候
菲尔