Only Start Time Events

Is there a simple way to create an event that has the same start and end date?

I’d to be able to schedule events that will kickoff at the requested start date-time. But these events will run for a variable amount of time, so specifying an end time doesn’t really make any sense.

For example, let’s say I want to schedule a backup of my systems for Sundays at 10pm. I have no idea how long the backup is going to take, I just know I want it to start at 10pm. No reason the user should have to specify an end date-time.

Suggestions?

Thanks,
Mike

You can store on server side and dynamically set end time on client side after data loading ( can be done through onEventLoading event ).

But you can’t ignore end date at all, as client side scheduler’s code requires end-date for correct rendering ( it will work incorrectly if end-date of event is the same as start date )

Thanks for the response.

So the Scheduler can only handle fixed time events that have both a start time and an end time? And the end time must be different (greater) than the start time?

Is there a clean way to hide the end date selector from view and use event_duration and auto_end_date to generate the end_date so that the scheduler is happy?

I really like to be able to allow users to just enter a start date. And when they are looking at the calendar, they see events that start at a time, but not a duration since it could very well be wrong. A system backup could take 2, 3, 5 or 10 hours. All they are scheduling is the kickoff (or start) of the backup.

Thanks again.

Yes

Yes

//autogenerate end dates scheduler.attachEvent("onEventLoading", function(obj){ obj.end_date = scheduler.date.add(obj.start_date, "minute", 5); return true; })

//hide end date scheduler.config.event_duration = 5; scheduler.config.auto_end_date = true; scheduler.attachEvent("onLightbox", function(){ var selects = scheduler.formSection("time").control; for (var i=4; i<selects.length; i++) selects[i].style.display = "none"; })

Thanks dude. In order to get rid of the dash as well, you’d want

scheduler.attachEvent("onLightbox", function() {
	var selects = scheduler.formSection('time').control;
	for(var i=4; i<selects.length; i++) {
		selects[i].style.display = 'none';
	}

	dashSpan = scheduler.formSection('time').node.getElementsByTagName('span');
	
	// Probably not needed, but for safety's sake
	if(dashSpan.length) {
		dashSpan[0].style.display = 'none';
	}
});