How to allow drop an item on specified point only?

From the sample Timeline diagram, how do I add/drop item from the palette to the diagram specified point/timeline x-axis? I only want to allow the item from palette to be added vertically (y-axis) on that specific time line (x-axis).

First, I should point out that during a drag there is no way to prevent when or where the user releases the button/finger. So the drop point can always be anywhere.

However you have complete control over where the dropped Part(s) are located, and you have control over where the temporary dragged Part(s) are located during the drag. This is clearly shown in the Drag Unoccupied sample: Drag Unoccupied

Regarding only the drop event, when handling a drag-and-drop from another diagram such as a Palette, you can implement an “ExternalObjectsDropped” DiagramEvent listener that looks at the dropped parts (which are provided as the Diagram.selection or the DiagramEvent.subject) and then decides for each one what the final Part.location should be, just by setting that property.

If you want to provide appropriate feedback during the drag, then one possibility is to implement a Part.dragComputation function on the template(s) of the dragged parts. Part | GoJS API
Alternatively, you could customize the DraggingTool’s behavior.