appointment time does not show correctly when using recurrence rules

2 posts, 0 answers
  1. Ming Zhao
    Ming Zhao avatar
    44 posts
    Member since:
    Sep 2009

    Posted 19 Aug 2010 Link to this post

    In Q2 2010 SP1,  we use following codes to implment appointments using recurrencerule.  But the appointment time in recurring appointments do not show correctly ( see attached screen shot).  This happens to all recurrence rules ( monthly, weekly and daily)





    Appointment ap = new Appointment();



    DailyRecurrenceRule drule = new DailyRecurrenceRule();


    drule.Start =



    drule.End =



    ap.Start =

    new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day, 9, 0, 0);


    ap.End =

    new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day, 11, 0, 0);


    ap.RecurrenceRule = drule;




    There is not problem , using the same codes in earlier versions such as Q2 2009


  2. Dobry Zranchev
    Dobry Zranchev avatar
    349 posts

    Posted 20 Aug 2010 Link to this post

    Hello Ming Zhao,

    Thank you for writing.

    Note that your code does not set the EndDate of the DayliRecurrenceRule object correctly. Please try the following snippet:

    DateTime dtStart = new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day, 9, 0, 0);
    Appointment ap = new Appointment(dtStart, dtStart.AddHours(2));
    DailyRecurrenceRule drule = new DailyRecurrenceRule(dtStart, DateTime.Today.AddYears(2).AddHours(2), 1);
    ap.RecurrenceRule = drule;

    I hope this helps. Let me know if I can assist you further.

    Dobry Zranchev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top