Hi there,
I would like to disable or remove the <li> containing the "never" radiobutton, to force the user to set an end for the task. I managed to do this on the edit-event, but only for existing tasks. When I tried to hook the "change"-event of the recurrenceEditor, I couldn't get the selector $(':radio[value="never"]') to work. This part is undocumented, and a bit hard to "guess". Anyone got a hint?
Some example code:
I would like to disable or remove the <li> containing the "never" radiobutton, to force the user to set an end for the task. I managed to do this on the edit-event, but only for existing tasks. When I tried to hook the "change"-event of the recurrenceEditor, I couldn't get the selector $(':radio[value="never"]') to work. This part is undocumented, and a bit hard to "guess". Anyone got a hint?
Some example code:
01.<div data-container-for="recurrenceRule" class="k-edit-field">02. <div data-bind="value:recurrenceRule" id="recurrenceEditorDiv"></div>03. <script>04. $(function() {05. $("\#recurrenceEditorDiv").kendoRecurrenceEditor(06. {07. frequencies: ["never", "weekly"],08. change: function(e) {09. // This would be nice if it worked10. var rb = e.container.find(".k-recur-end-never");11. rb.attr('disabled', 'disabled');12. 13. // Or this. This works in the grid's "edit"-event14. var li = e.container.find(".k-recur-end-never")15. .parent()16. .parent();17. li.remove();18. },19. messages: {20. end: {21. after: " efter ",22. occurrence: " händelse(r)",23. label: "Slut",24. never: " aldrig",25. on: " på "26. },27. frequencies: {28. weekly: "per vecka",29. never: "aldrig",30. },31. offsetPositions: {32. first: "första",33. second: "andra",34. third: "tredje",35. fourth: "fjärde",36. last: "sista"37. },38. weekly: {39. interval: " vecka(or)",40. repeatEvery: "Intervall",41. repeatOn: "Dagar "42. },43. weekdays: {44. day: "Dag",45. weekday: "Veckodag",46. weekend: "Helgdag"47. }48. }49. });50. });51. <\/script>52.</div>
