This is a migrated thread and some comments may be shown as answers.

Show Kendo Recurrence Editor as read-only mode?

2 Answers 29 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Nuttachai
Top achievements
Rank 1
Nuttachai asked on 25 Feb 2021, 08:02 AM

Hello,

I'm working on an app that needs to display Kendo Recurrence Editor as read-only mode. Is the component have read-only option?

Example on the attached image.

 

Thanks,

2 Answers, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 02 Mar 2021, 08:05 AM

Hi Nuttachai,

In order to render the widgets in the Recurrence Editor in a read-only mode, I would suggest you subscribe to the edit event of the Scheduler. In the event handler, you could find the inputs you need to render as readonly. Then, for example for NumerictTextBox, DateTimePickers, ButtonGroup, you could use the enable method and set it to false.  Below is an example of setting the 'Repeat' ButtonGroup and the 'Repeat every' NumericTextBox to non-editable:

 

  edit: function(e){             
            if($("[data-role='recurrenceeditor'] .k-button-group").length > 0){
                  $("[data-role='recurrenceeditor'] .k-button-group").data("kendoButtonGroup").enable(false);                   
            } 

            var numeric = e.container.find("input.k-recur-interval[data-role='numerictextbox']")

            if(numeric.length > 0){
                 $("input.k-recur-interval[data-role='numerictextbox']").data("kendoNumericTextBox").enable(false);                    
            } 
          },

Here is a Dojo example where the described above is implemented. I hope you will find the example helpful. 

Regards,
Neli
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Nuttachai
Top achievements
Rank 1
answered on 02 Mar 2021, 10:59 AM

Hi Neli,

Thank you so much for your kindly support.

Very much appreciated.

 

Regards

Tags
Scheduler
Asked by
Nuttachai
Top achievements
Rank 1
Answers by
Neli
Telerik team
Nuttachai
Top achievements
Rank 1
Share this question
or