Print Page | Close Window

How to set Next Weeks to a user selected date rang

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=12140
Printed Date: 01 July 2024 at 2:04am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to set Next Weeks to a user selected date rang
Posted By: BCS123
Subject: How to set Next Weeks to a user selected date rang
Date Posted: 11 September 2008 at 5:09pm

We are in the process of evaluating this control and so I am brand new to this .. I use the Active X Com control for the Calendar .. yes still in the dark ages and using VB 6... To customize the look and feel of our application we have Previous and Next and Find Date btns on all our screens. To make this control in line with our standards I have turned off the ShowCaptionBarScrollDateButtons and I need to add code in the regular command buttons to scroll thro the weeks... the following is the code i have in the NEXT command btn... I see the datepicker highlight moves to ensure that the dates get reset but the calendar doesnt ... it still stays on the current date and week

ShowDay of the weekview states that if this is set the selectionchange event is triggered and the control moves the week to include this date..  this doesnt work... pls advise as to what am i doing wrong...
 
More information -Provider = custom and db is SQL SERVER.
 
    If CalendarControl.ViewType = xtpCalendarFullWeekView Or CalendarControl.ViewType = xtpCalendarWeekView Or CalendarControl.ViewType = xtpCalendarWorkWeekView Then
        DOWStartDate = DateAdd("d", -Weekday(nxtDate) + 1, nxtDate)
        DOWEndDate = DateAdd("d", EndofWeek - Weekday(nxtDate), nxtDate)
        wndDatePicker.SelectRange DOWStartDate, DOWEndDate
        CalendarControl.WeekView.ShowDay DateAdd("d", -2, DOWEndDate)
       CalendarControl.Populate
       CalendarControl.DayView.ScrollToWorkDayBegin
       wndDatePicker.RedrawControl
 end if
 
Thanks



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