Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kendo UI - Hide "End: Never" option from Recurrence Editor

I am having trouble to hide one option in recurrence editor in a standardized way. I have tried to hide it by custom code but it sometimes creates not predictable behaviour.

This is what I am trying to hide:

enter image description here

like image 430
Jakub Holovsky Avatar asked Dec 26 '22 08:12

Jakub Holovsky


1 Answers

You need to handle the edit event of the scheduler and hide that option via jQuery:

function scheduler_edit(e) {
  // find the recurring dropdownlist 
  var dropdown = e.container.find("[data-role=dropdownlist]").data("kendoDropDownList");

  // handle its change event
  dropdown.unbind("change", hide_never);
  dropdown.bind("change", hide_never);
}

function hide_never() {
  // hide the <li> element that contains the "Never" radio option
  $(".k-recur-end-never").closest("li").hide();
}
like image 196
Atanas Korchev Avatar answered Jan 12 '23 13:01

Atanas Korchev