react-scheduler icon indicating copy to clipboard operation
react-scheduler copied to clipboard

Specify start and end times when 30 minute steps?

Open IIRobotNinjaII opened this issue 8 months ago • 1 comments

Is it possible to specify start and end dates instead of start and end hours?

For example, if I want it to render slots from 9 am to 10:30, I would have to specify startHours as 9 and endHours as 11 but that would include an extra slot from 10:30 to 11 in day view.

Is there a way to ensure only slots are 9 am - 9:30 am, 9:30 - 10 am and 10 am to 10:30 am?

const Scheduler = ({start,end}) => {
    let end_time = new Date(moment(end).add(30, 'minutes'))
    return (
        <Scheduler
            view="day"
            day={
                {
                    startHour:start.getHours(),
                    endHour: end_time.getHours(),
                    step:30,
                    navigation: false
                }
            }
            disableViewNavigator
            navigation
        />
    )
}

IIRobotNinjaII avatar May 27 '24 22:05 IIRobotNinjaII