search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Half Day Blocks

Asked by Jerod Houghtelling
3 years ago.

We currently use the DayPilot scheduler in hotel style reservation system. The unique thing is that since we have a check-in/check-out times we would like the DayPilot scheduler to only allow moving or resizing to the 1/2 day increment (T12:00:00).

We are populating the reservation by adding T12:00:00 as we think it looks better to see when someone is arriving so you don't have to subtract a day or when they are departing so you don't have to add a day.

I can see how we can snapToGrid which snaps at T00:00:00 and T12:00:00, but ideally we'd only like to snap to T12:00:00.

Any suggestions?

Answer posted by Jerod Houghtelling
3 years ago.

Found a solution...

function onEventMoving(args) {
args.start = args.start.getDatePart().addHours(12);
args.end = args.end.getDatePart().addHours(12);
}

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.