Home Unanswered Active Tags New Question

MenuItem wehere Command=Delete and Action=JavaScript fails

My code:

<DayPilot:MenuItem Text="Delete" Action="JavaScript" Command='Delete' JavaScript="if (confirm('Delete ' + e.text() + ' ?')) dps1.eventMenuClickCallBack(e, command);"></DayPilot:MenuItem>

Js: Error: 'command' is undefined.

Error also on http://www.daypilot.org/demo/Scheduler/

Asked by Morten 1 year ago.
Replies

Yes...I've got the same.

Comment posted by Ante 1 year ago.
I had the same issue. Apparently in the latest version they don't define the Command parameter. So I just replaced Command with the literal command 'Delete' and that worked like such: ... Text="Delete" Command="Delete" Action="JavaScript" JavaScript="if (confirm('Do you really want to delete this event?')) dps1.eventMenuClickCallBack(e, 'Delete');"
Comment posted by Jason 1 year ago.

This is fixed now in the sandbox (since build 6.1.2121).

Comment posted by Dan Letecky 1 year ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java