- Home
- Forum
- JavaScript - EJ 2
- Is there a way to remove the "repeat every" option when creating recurring schedules
Is there a way to remove the "repeat every" option when creating recurring schedules
I am using the schedule control and when creating recurring events I would like to remove the abiolity for a user to use the "Repeat every" (Day(s), Week(s),Month(s)) options. Is there a way to target and remove that element? Thanks!
I currently have it in my html as.
Thanks for the reply. That worked. I had tried that several times in the past and never worked so not sure what changed now. One last thing related to this, I'm trying to hide the monthly 'Repeat on day x' for instance I dont want them to be able to repeat on a specific day each month, only a specific dayPos e.g first tuesday.
So I used:
Thanks!
Attachment: Untitled_f6c9ca6d.zip
How to remove never in End (Repeat)
Hi Hari,
Greetings from Syncfusion Support.
We have checked your requirement “We need to remove the "never" list from the End drop-down” and we can achieve your requirement by modifying the data source of the dropdown list. Here we have used the popupOpen event to modify the datasource like the below code.
function
onPopupOpen(args) {
if (args.type === 'Editor') {
var
recurElement = document.querySelector('.e-recurrenceeditor');
var
endList = recurElement.ej2_instances[0].endType.dataSource;
if (endList.length === 3) {
var
newDatasource = [
{ text:
'Until', value:
'until' },
{ text:
'Count', value:
'count' },
];
recurElement.ej2_instances[0].endType.dataSource = newDatasource;
}
}
Sample: https://stackblitz.com/edit/4a3eli-fhvbrf?file=index.js
Kindly try the above solution and get back to us if you need any further assistance.
Regards,
Vengatesh
- 9 Replies
- 3 Participants
- Marked answer
-
DB Daniel Brown
- Jul 6, 2020 09:01 PM UTC
- Dec 6, 2021 05:46 AM UTC