Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Picking a date
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Picking a date

 Post Reply Post Reply
Author
Message
dexatron View Drop Down
Newbie
Newbie
Avatar

Joined: 27 January 2010
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote dexatron Quote  Post ReplyReply Direct Link To This Post Topic: Picking a date
    Posted: 27 January 2010 at 8:59am
Hi, I have a quick question for you.

I want to use the calendar manually.  That is I need a few events that include:

Date change --> returns the date clicked on
Month change --> notifies that the month has changed
Event click --> returns the id of an event so that I can take action

The Date change is the most important to me, I've been trying to extract this using the dbl-click event, with hittest

but obviously this line of code doesn't work becuase there is no selection property.

 gDate = Format(CalendarControl.ActiveView.days(CalendarControl.ActiveView.Selection).Date, "YYYY-MM-DD")

any help greatly appreciated, Greg
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 29 January 2010 at 7:15pm
Why don't use same way as in function which use HitTest.ViewEvent.Event (e.g. you can use HitTest.ViewEvent.Event.StartTime)
Private Sub CalendarControl_DblClick()
    Dim HitTest As CalendarHitTestInfo
    Set HitTest = CalendarControl.ActiveView.HitTest
   
    Dim Events As CalendarEvents
    If Not HitTest.HitCode = xtpCalendarHitTestUnknown Then
     '   Set Events = CalendarControl.DataProvider.RetrieveDayEvents(HitTest.ViewDay.Date)
    End If
   
    If HitTest.ViewEvent Is Nothing Then
        MsgBox HitTest.HitDateTime
        mnuNewEvent_Click
    Else
        ModifyEvent HitTest.ViewEvent.Event
    End If
End Sub
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.125 seconds.