Hi, I have a calendar control and in the Dayview, by default the start time of the appointments is 8 am and the end time is 5 pm. I would like to modify it to let's say 7 am to 6 pm. I tried doing the following: udvMasterDay is UltraWinSchedule.UltraDayView
Dim day = udvMasterDay.CalendarInfo.ActiveDay.Date
udvMasterDay.CalendarInfo.DaysOfWeek(Day.DayOfWeek).WorkDayStartTime = udvMasterDay.CalendarInfo.DaysOfWeek(Day.DayOfWeek).WorkDayStartTime.AddHours(-1)
udvMasterDay.CalendarInfo.DaysOfWeek(Day.DayOfWeek).WorkDayEndTime = udvMasterDay.CalendarInfo.DaysOfWeek(Day.DayOfWeek).WorkDayEndTime.AddHours(1)
While it looks like it shows a extra space above the first appointment that starts at 8 am, this extra space does not have any times on the left unlike other time slots
Am I doing it the right way. Is there any other way modifying this start and end time can be done? Kindly clarify.
Using the code you posted I was unable to reproduce the behavior you're describing. I have attached the sample project I used to test this as well as a screenshot of the result I had. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this issue.
If the project does not work correctly, this indicates either an issue possibly specific to your environment, or a difference in the DLL versions we are using. My test was performed using Infragistics for Windows Forms 2017 with latest service release. So could you please let me know the exact version of Infragistics components which you are using?
If the project does show the product feature working correctly, this indicates a possible issue in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.
Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back.
Please let me know if I can provide any further assistance.
Sincerely,MilkoAssociate Software Developer
I was able to extend the workday by updating the calendar's LogicalDayOffset, LogicalDayDuration properties instead. However, why does the extended duration appear in a different color? I noticed that in your screenshot too. How do I change it to the same color as the default calendar time...
Me.uciSchedule.LogicalDayDuration = System.TimeSpan.Parse("10:00:00")
Me.uciSchedule.LogicalDayOffset = System.TimeSpan.Parse("08:00:00")
You can set the appearance of working and nonworking hours time slots by setting WorkingHourTimeSlotAppearance and NonWorkingHourTimeSlotAppearance. However, looking at what you are trying to achieve I believe you are actually need to set some specific working hours for your day view. You can do this through day view’s calendar info. In calendar info you have DaysOfWeek property. It contains information about each day of the week. For each day of the week you can set WorkDayStartTime and WorkDayEndTime like this:
Me.udvMasterDay.CalendarInfo = Me.uciSchedule Dim monday As Infragistics.Win.UltraWinSchedule.DayOfWeek = Nothingmonday = Me.uciSchedule.DaysOfWeek(System.DayOfWeek.Monday)monday.WorkDayStartTime = DateTime.Today.AddHours(7.0F)monday.WorkDayEndTime = DateTime.Today.AddHours(18.0F)
Note you should do this for each working day of the week. Additional information about this you may find in our online documentation in this topic “Set Specific Working Hours”.
Please let me know if you need any further assistance on this matter.