I tried to default "END BY" as my default recurrance appointment, can you please check below code?
<script type="text/javascript">
function OnClientFormCreated(sender, eventArgs) {
$telerik.$(".rsAdvRecurrenceRangePanel .rsAdvOptionsPanel ul li:first-child").hide();
$telerik.$(".rsAdvRecurrenceRangePanel .rsAdvOptionsPanel ul li:nth-child(2)").hide();
$telerik.$('.rsAdvWeekly_WeekDays li:first-child').hide();
$telerik.$('.rsAdvWeekly_WeekDays li:last-child').hide();
}
function pageLoad() {
var $ = $telerik.$;
$(".rsRecurrenceOptionList").children().each(function (i) {
if (i < 2)
$(this).hide();
});
var $ = $telerik.$;
$(".rsRecurrenceOptionList").children().each(function (i) {
if (i ==4)
$(this).hide();
});
}
function schedulerFormCreated(scheduler, eventArgs) {
// Create a client-side object only for the advanced templates
var mode = eventArgs.get_mode();
if (mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert || mode == Telerik.Web.UI.SchedulerFormMode.AdvancedEdit) {
var $ = $telerik.$;
var checkbox = $("[id$='RepeatUntilGivenDate']");
checkbox.attr("checked", true);
// Initialize the client-side object for the advanced form
var formElement = eventArgs.get_formElement();
}
}
</script>
<script type="text/javascript">
function OnClientFormCreated(sender, args) {
$telerik.$(".rsAdvRecurrenceRangePanel .rsAdvOptionsPanel ul li:first-child").hide();
$telerik.$(".rsAdvRecurrenceRangePanel .rsAdvOptionsPanel ul li:nth-child(2)").hide();
$telerik.$('.rsAdvWeekly_WeekDays li:first-child').hide();
$telerik.$('.rsAdvWeekly_WeekDays li:last-child').hide();
var $ = $telerik.$;
var mode = args.get_mode();
if (mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert || mode == Telerik.Web.UI.SchedulerFormMode.AdvancedEdit) {
var recurrenceEditorJqueryObj = $("[id$='RangeEndDate']");
var recurrenceEditor = $find(recurrenceEditorJqueryObj.attr("id"));
var today = new Date();
today.setMonth(today.getMonth() + 6);
recurrenceEditor.set_selectedDate(today);
$(document).ready(function (event) {
$("#RadSchedulerRecurrenceEditor1_RepeatUntilGivenDate").attr('checked', true);
});
}
}
</script>
<script type="text/javascript">
$(document).ready(function (event) {
$("#RadSchedulerRecurrenceEditor1_RepeatUntilGivenDate").click(function () {
if ($('#RadSchedulerRecurrenceEditor1_RepeatUntilGivenDate').is(':checked')) {
if (RadSchedulerRecurrenceEditor1._getControl("RepeatUntilGivenDate").get_value() == "") {
alert("text is empty");
}
}
});
});
</script>