search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

How To Redirect To URL By Clicking Event

Asked by Anonymous
6 years ago.

This was asked 3 years ago but never answered.

How would I be able to redirect to another page when the user clicks an event? I can see from the demo and source provided that when I click an event it raises a click event with an alert unique to that event, but I don't know what code to add or modify to handle the click event.

Ideally I could go to the details page for that event by clicking it. This would either be through the click event or by making the event text a hyperlink. I don't know where to make this change.

Answer posted by Dan Letecky [DayPilot]
6 years ago.

Use the following config:

@(Html.DayPilotCalendar("dpc", new DayPilotCalendarConfig { 
  // ...
  EventClickHandling = EventClickHandlingType.JavaScript,
  EventClickJavaScript = "window.location.href = 'Edit/' + e.value();",				

This will redirect the browser to "Edit/id" URL.

See also:

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.