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

Show reminder for scheduler appointments in past

1 Answer 67 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Pratik
Top achievements
Rank 1
Pratik asked on 14 Apr 2015, 01:26 AM

I am programatically adding two appointments to a rad scheduler, one with start DateTime in past and one with start DateTime on current date. The reminder only shows the appointment on current date. I also want to reminders for all appointments in the past as well. How can I achieve this.

The business scenario is when a user starts the application it should remind them of all appointments in the past from now immediately and the appointments on today 15 minutes before start.

Code below

Appointment appointment1 = new Appointment(DateTime.Now.AddMinutes(15).AddSeconds(5), new TimeSpan(1, 0, 0));
appointment1.Summary = "Appointment Today";
appointment1.Description = "Appointment Details";
appointment1.Reminder = new TimeSpan(0, 15, 0);
radScheduler1.Appointments.Add(appointment1);

Appointment appointment2 = new Appointment(DateTime.Now.AddDays(-1), new TimeSpan(1, 0, 0));
appointment2.Summary = "Appointment 1 day in past";
appointment2.Description = "Appointment Details";
appointment2.Reminder = new TimeSpan(0, 15, 0);
radScheduler1.Appointments.Add(appointment2);

radSchedulerReminder1.StartReminder();

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 16 Apr 2015, 12:31 PM
Hello Pratik,

Thank you for writing.

It is necessary to specify the RadSchedulerReminder.StartReminderInterval property to a date in the past from which you want the reminder to check for available appointments:
public Form1()
{
    InitializeComponent();
 
    Appointment appointment1 = new Appointment(DateTime.Now.AddMinutes(15).AddSeconds(2), new TimeSpan(1, 0, 0));
    appointment1.Summary = "Appointment Today";
    appointment1.Description = "Appointment Details";
    appointment1.Reminder = new TimeSpan(0, 15, 0);
    radScheduler1.Appointments.Add(appointment1);
 
    Appointment appointment2 = new Appointment(DateTime.Now.AddDays(-1), new TimeSpan(1, 0, 0));
    appointment2.Summary = "Appointment 1 day in past";
    appointment2.Description = "Appointment Details";
    appointment2.Reminder = new TimeSpan(0, 15, 0);
    radScheduler1.Appointments.Add(appointment2);
 
    radSchedulerReminder1.TimeInterval = 1000;
    radSchedulerReminder1.StartReminderInterval = DateTime.Now.AddDays(-2);
    radSchedulerReminder1.StartReminder();
   
}

I hope this information helps. Should you have further questions, I would be glad to help.
 
Regards,
Dess
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Scheduler and Reminder
Asked by
Pratik
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or