Print Page | Close Window

Set start and end date in month view?

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=2915
Printed Date: 22 November 2024 at 4:49am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Set start and end date in month view?
Posted By: Nataraj
Subject: Set start and end date in month view?
Date Posted: 19 September 2005 at 1:09am

Hi,

How do i set the start and end date in the month view? Currently on load it shows the current month, however i can use the scrollbar to scroll to different date of previous / next year. How do i control the scrolling i.e. what property / method can i use to show data for a specific date range. In day view i can use ShowDays method to specify a start and end date. Similarly how can i achieve the same result in month view?




Replies:
Posted By: sserge
Date Posted: 19 September 2005 at 11:31am
Hi Nataraj,

You can use following methods:

pMonthView->GetGrid()->SetBeginDate(dtBegin);
pMonthView->GetGrid()->SetWeeksCount(nWeeks);

pCalendarCtrl->Populate();


--
WBR,
Serge


Posted By: Nataraj
Date Posted: 19 September 2005 at 10:44pm

Hi,

Iam using the control in IE, there is a ShowDay Method and WeeksCount property of the monthview. Using this the initial date is set to the date specified, but i dont want the end user to scroll to other dates. I want the view to be restricted only to a specific date range. In this case the scroll bar should not be present / should be disabled since iam viewing only a specific date range. Can this be achieved?



Posted By: sserge
Date Posted: 20 September 2005 at 3:59am
Hi,

You can disable scrollbars for views with .EnableVScroll and .EnableHScroll methods.

--
WBR,
Serge


Posted By: Nataraj
Date Posted: 20 September 2005 at 10:53pm

Hi,

I was not able to find these methods either in the help or in the object browser of vb. Iam using the evaluation version of Xtreme Suite Professional 9.7.0.0. Are these methods present in this version or some other version? Which object do these methods belong to? I tried DayView,WeekView,MonthView and ActiveView objects, none of these have these methods.



Posted By: sserge
Date Posted: 21 September 2005 at 11:20am
Hm, as far as I can see :) CalendarDayView object contains these methods even in 9.7.

But you can wait couple days for 9.8 release, which has the newest sources.


Posted By: WaaZ
Date Posted: 20 February 2006 at 5:37am

Hi, where can I get the date of the first day being currently displayed? I have seen that you are using a SetbeginDate above. Where can I get this method?

1) Or how can I get the start and end date of the actual view of the calendar?

2) What handler is triggered when I change the current date range view?

thnks

WaaZ



Posted By: sserge
Date Posted: 20 February 2006 at 7:00am
CalendarView is a collection of CalendarViewDay objects.
 
    CalendarView[0].Date : first day date;
    CalendarView[CalendarView.DaysCount - 1].Date : last day date;
 
Just look into hierarchy of Calendar objects.


--
WBR,
Serge


Posted By: WaaZ
Date Posted: 20 February 2006 at 8:44am

thnks.

It works fine.

for more info:

It is in the CalendarControl.ActiveView. The ActiveView object is a collection of CalenderViews.



Posted By: sserge
Date Posted: 20 February 2006 at 9:02am
ActiveView is not a collection of views, it is a reference pointing into the currently used view, which user see at th screen.

btw, answer to your second question:
2) There is a ViewChanged event.

--
WBR,
Serge



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