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

Edit recurrenceRule DropDown options

4 Answers 237 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Ran
Top achievements
Rank 1
Ran asked on 24 Nov 2015, 04:49 PM

Hi,

 I would like to remove "Never" and "Yearly" from the recurrenceRule(Repeat) DropDown options.

 How can i do that?

 (I"m using angularJS)

 

Thanks,

 

Ido

4 Answers, 1 is accepted

Sort by
0
Accepted
Vladimir Iliev
Telerik team
answered on 26 Nov 2015, 09:12 AM
Hello Ran,

You can create custom editor template and adjust the "frequencies" option of the recurrence editor inside it. Please check the example below:

Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Ran
Top achievements
Rank 1
answered on 26 Nov 2015, 01:21 PM

Hi Vladimir,

 Good to know, working perfect!

Thanks,

Ran

0
Roy
Top achievements
Rank 1
answered on 22 Feb 2021, 09:06 PM

How would one go about removing options in the sub-sections. For example if a "Monthly" recurrence is selected, I would like to remove "day, weekday and weekend day" from the dropdown when the second radio button is selected. I basically just want Mon-Sun.

Thanks.

0
Aleksandar
Telerik team
answered on 25 Feb 2021, 12:31 PM

Hello Roy,

As there is no configuration option available in the Scheduler, that would allow you to configure this upon initialization, you can achieve the desired result by handing the edit event of the Scheduler. Then attach a click handler to the monthly button and update the dataSource of the DropDownList that is used for selection of the weekdays:

edit: function(e){
          $('span[data-value="monthly"]').click(function(){
            setTimeout(function(){ //make sure the content of the container is rendered
              var ddl = $('input.k-recur-weekday').data('kendoDropDownList')
              if(ddl){
              var data = ddl.dataSource.data();
              var newData = data.filter(function(e){
                console.log(e)
                return e.value > 0 && e.value < 6
              })           
              ddl.setDataSource(newData)   
            }
              },0)
            })
        },

Here is a sample dojo demonstrating the above.

Regards,
Aleksandar
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/.

Tags
Scheduler
Asked by
Ran
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Ran
Top achievements
Rank 1
Roy
Top achievements
Rank 1
Aleksandar
Telerik team
Share this question
or