import {Calendar} from "antd-mobile";
import dayjs from "dayjs";

const ToDoCal = (props) => {
    const defaultSingle = new Date()
    const today = dayjs()
    return (
        <Calendar
            selectionMode='single'
            renderLabel={date => {
                if (dayjs(date).isSame(today, 'day')) return '今天'
                if (date.getDay() === 0 || date.getDay() === 6) {
                    return '周末'
                }
            }}
            defaultValue={defaultSingle}
            onChange={val => {
                console.log(val)
            }}
        />
    )
}
export default ToDoCal;