Print Page | Close Window

MonthView Issue

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=18213
Printed Date: 08 July 2024 at 12:00pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: MonthView Issue
Posted By: cannones
Subject: MonthView Issue
Date Posted: 12 April 2011 at 10:40pm
Hi All,

Why is it that when I am in month view and I display an appointment that commences say on the 26/04/2011 12:00AM and concludes on the 27/04/2011 23:59 PM then it only shows it as one day on the view..??.

Is there a property that can be set so that it will physically show that the task will take at least two days ?? or do I need to implement a workaround ??

Sam



Replies:
Posted By: cannones
Date Posted: 29 April 2011 at 8:16am
Can someone from codejock please reply to this message ?


Posted By: SuperMario
Date Posted: 06 July 2011 at 1:21pm
What code do you use to do this?  If you use the code from the sample I noticed it does not handle custom time entered into the start\end time, it only uses the time values entered into the combo.  So what happens is when you enter your custom time is it uses the value at index 0, which is 12AM and makes you have an event that stops before your next day begins.

As a test add a combo entry of 11:59 PM to the calendar sample and see that it does work:

.....
            dtHours = dtHours.AddMinutes(-1);
            cmbEndTime.Items.Insert(48, dtHours.ToShortTimeString());

            cmbStartTime.SelectedIndex = 10;
            cmbEndTime.SelectedIndex = 11;

Maybe in your code you will just check that they entered a valid time that is greater than the start time.  As you can see the sample does not account for this and uses only the indexed values:

                StartTime = StartTime.AddHours(cmbStartTime.SelectedIndex / 2);
                EndTime = EndTime.AddHours(cmbEndTime.SelectedIndex / 2);

We will update the samples to allow custom time as well.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net