Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Add Holidays to Calendar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Add Holidays to Calendar

 Post Reply Post Reply
Author
Message
dentor View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2005
Location: France
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote dentor Quote  Post ReplyReply Direct Link To This Post Topic: Add Holidays to Calendar
    Posted: 22 December 2005 at 3:24am
Is there a way to add holidays to the Xtreme Calendar control, to display a different color for that days when displaying the day or WorkWeek, the same way as 'WorkDayStartTime' does ?
 
Eventually, a different color to display lunch time ?
 
Thanks for your reply. 
Back to Top
kylechen View Drop Down
Groupie
Groupie


Joined: 29 November 2004
Status: Offline
Points: 57
Post Options Post Options   Thanks (0) Thanks(0)   Quote kylechen Quote  Post ReplyReply Direct Link To This Post Posted: 24 December 2005 at 12:03am
Same question here too. Thanks
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 24 December 2005 at 11:18am
Hello,

Currently there are only 2 ways to define work time for the Calendar control: using DayStartTime / DayEndTime properties and using WorkWeekMask property. First pair allows controlling work time during the day, and the second one – for days of the week.

So, unfortunately you can not control a lunch time. We’ll consider those as a feature requests for the next version.

Currently I can propose only 1 workaround for controlling work/non work days like holidays. The idea is that if you have shown no more than 1 week in day view, you can capture days selection changed event and adjust WorkWeekMask property according to days on the current week  Something like the following:


Private Sub CalendarControl_SelectionChanged(ByVal SelType As  XtremeCalendarControl.CalendarSelectionChanged)
    If SelType = xtpCalendarSelectionDays Then
        ...
        CalendarControl.Options.WorkWeekMask = xtpCalendarDaySunday
        For i = 0 To DaysCount
             If CalendarControl.ActiveView.Days(i).Date = CheckedDate Then
                 CalendarControl.Options.WorkWeekMask = CalendarControl.Options.WorkWeekMask Or xtpCalendarDayWednesday
    ...




Or, if you are using C++/MFC version of the control, you can override  IsWorkDateTime method, and that would solve both problems.

--
WBR,
Serge
Back to Top
kylechen View Drop Down
Groupie
Groupie


Joined: 29 November 2004
Status: Offline
Points: 57
Post Options Post Options   Thanks (0) Thanks(0)   Quote kylechen Quote  Post ReplyReply Direct Link To This Post Posted: 24 December 2005 at 8:43pm

Thank you sserge. I understand your explaination and workaround solution. However I actually need is a "highlight" of holidays (not only in day week view but also in month view, etc.) or lunch time. Even more some cusotmized icon could be displayed for special days like a bell for Xmas Day. I believe this has not been implemented in ActiveX version yet. Just wish it be done next release.

Thank you anyway.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.234 seconds.