Reload windows onAfterLightbox

Hi all.
I have this function:

scheduler.attachEvent("onAfterLightbox", function(){ window.setTimeout("window.location.reload(true);", 1000); });
and work perfectly.
Whenever I close lightbox or save event the page reload.

But now I want reload windows only if the new event is Today and not if the new event is in the future.

Can someone help me?

Thank You

Sondra

You can attach event handler to onBeforeLightBox to store id of event, which will be edited

var edit_id; scheduler.attachEvent("onBeforeLightbox", function(id){ edit_id = id; return true; })

now, in onAfterLightbox, you can use

scheduler.getEvent(edit_id).start_date

and based on its value execute some action.