Show reminder for scheduler appointments in past

2 posts, 0 answers
  1. Pratik
    Pratik avatar
    3 posts
    Member since:
    Jul 2010

    Posted 13 Apr 2015 Link to this post

    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();

  2. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 16 Apr 2015 Link to this post

    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.

     
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top