jQuery UI Widgets › Forums › Angular › jqxScheduler Recurrence Pattern weekly
Tagged: Angular, jqxScheduler
This topic contains 1 reply, has 2 voices, and was last updated by admin 2 weeks, 2 days ago.
-
Author
-
How can i set the repeat to weekly by default when i create an appointment?
Hi semajame,
I would suggest you to handle the editDialogCreate function of the Scheduler. All fields are defined in the second parameter which includes the repeat related fields. console.log them to find the one which fits to your requirements and set its value. By doing this, every time the Dialog is opened, you will see the default value. NOte that this callback function is executed once when you open the scheduler’s dialog for first time. For further customization, you may need to handle the editDialogOpen function, too.
` editDialogCreate: function (dialog, fields, editAppointment) {
// hide repeat option
fields.repeatContainer.hide();
// hide status option
fields.statusContainer.hide();
// hide timeZone option
fields.timeZoneContainer.hide();
// hide color option
fields.colorContainer.hide();
fields.subjectLabel.html(“Title”);
fields.locationLabel.html(“Where”);
fields.fromLabel.html(“Start”);
fields.toLabel.html(“End”);
fields.resourceLabel.html(“Calendar”);
// add custom print button.
printButton = $(““);
fields.buttons.append(printButton);
printButton.jqxButton({ theme: this.theme });
printButton.click(function () {
var appointment = editAppointment;
if (!appointment)
return;
var appointmentContent =
“” +
“” +
“Title ” +
“” + fields.subject.val() + “ ” +
“” +
“” +
“Start ” +
“” + fields.from.val() + “ ” +
“” +
“” +
“End ” +
“” + fields.to.val() + “ ” +
“” +
“” +
“Where ” +
“” + fields.location.val() + “ ” +
“” +
“” +
“Calendar ” +
“” + fields.resource.val() + “ ” +
“”
+ ““;
\n’ +
var newWindow = window.open(”, ”, ‘width=800, height=500’),
document = newWindow.document.open(),
pageContent =
‘< !DOCTYPE html>\n’ +
‘\n’ +
‘
‘\n’ +
‘jQWidgets Scheduler \n’ +
‘‘ +
\n’ + appointmentContent + ‘\n\n‘;
‘\n’ +
‘
document.write(pageContent);
document.close();
newWindow.print();
});
},`Best regards,
Peter SToevjQWidgets Team
https://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.