In my lightbox I have build the possibility of setting types of appointments with predefinited time duration.
When I save a new event I want that the end_date value of event get the my predefinited time duration.
I use the connector.
I have a types of events with predefinited time duration.
Example, Coffe Break have a duration = 20 minutes, Tea Break = 30 minutes etc etc.
I want that this duration is SUM at start_date bypassing the my scheduler.config.time_step = 15;
When I save the event the end_date will be start_date + 30 minutes or 20 minutes etc etc.
Can you suggest some solution ? o the best way to do this?
function custom_upd($action){
$type = $action->get_value("type");
$sdate = $action->get_value("start_date");
$edate = $action->get_value("end_date");
... here you can change date in any necessary way
$action->set_value("end_date", $edate);
}
$scheduler->event->attach("beforeProcessing", "custom_upd");
Hi Stanislav.
I have build the function for add my custom end_date with your suggestion code and work.
But I have a little problem.
When I setting and save in my lightbox the type of appointments with his duration time, in scheduler I view the default duration of the event. My setting is :
scheduler.config.time_step = 15;
And If I refresh the page the event duration is scheduler.config.time_step value + my_custom duration.
Can you help me ?
Thank You