react-scheduler
react-scheduler copied to clipboard
Specify start and end times when 30 minute steps?
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
/>
)
}