Item Drag

Im wondering since i display 7 days from monday to sunday in the planner, How can I not allow an Item to be dragged in a previous day?
Im using the event 

onItemDrag
if item.itemstarttime<now
allow:=false
else
allow:=true
but i doesn't seem to get the desired result.

any help would be appreciated thanks

Try to use the OnItemMoving event.

When Allow = false, set the position of the item to an allowed position by changing Item.ItemBegin/Item.ItemEnd/Item.ItemPos

Thanks for the help bruno. I arrived at my desired output I use the onMoveItem event when the item is dragged at a previous day it will return to its original ItemPos ItemBegin and ItemEnd