You have to assign it on the client side as well:
dpc1.contextMenu = contextMenu1;
Where:
- "dpc1" is the value of DayPilotCalendar1.ClientObjectName
- "contextMenu1" is the value of DayPilotMenu1.ClientObjectName
Note that this will get overwritten during the next PostBack by the server-side settings.