We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
react-vant
react-vant-icons
^3.3.1
No response
Calendar 做日期区间选择,绑定onSelect事件,会默认自己选择节日日期到当日。
The text was updated successfully, but these errors were encountered:
无法复现,方便提供最小复现代码demo吗
Sorry, something went wrong.
`const [date, setDate] = useState('2014-03-01~2024-03-15')
const dateConfirm = (e) => { setDate(${dayjs(e[0]).format('YYYY-MM-DD')}~${dayjs(e[1]).format('YYYY-MM-DD')}) }
return ( <> 已选择的时间:{date}
<Calendar visible={true} type='range' minDate={new Date('2014/03/01')} maxDate={new Date()} color="#2D83E8" onSelect={(e) => dateConfirm(e)} showConfirm={false} maxRange={31} ></Calendar> </>
);`
const today = new Date() const tommorow = new Date(today.getTime() + 24 * 60 * 60 * 1000) const [date, setDate] = useState([today, tommorow]) return ( <Calendar type='range' value={value} onSelect={(v) => setValue(v)} /> )
No branches or pull requests
Which React Vant packages are impacted?
react-vant
(React Vant core)react-vant-icons
(React Vant Icon)What version of React Vant are you using?
^3.3.1
Reproduce live demo(codesandebox or stackblitz)?
No response
Descripition
Calendar 做日期区间选择,绑定onSelect事件,会默认自己选择节日日期到当日。
The text was updated successfully, but these errors were encountered: