Print Page | Close Window

Start and End Date in DatePicker

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=18148
Printed Date: 05 July 2024 at 12:08pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Start and End Date in DatePicker
Posted By: vollweise
Subject: Start and End Date in DatePicker
Date Posted: 01 April 2011 at 2:56am
How can I start date and end date
the date picker with VB or VBA query

Private Sub DatePicker2_SelectionChanged ()
MsgBox start date
MsgBox end date
End Sub

-------------
Michael Ricklefs



Replies:
Posted By: SuperMario
Date Posted: 01 April 2011 at 2:49pm
If you allow non-continuous selection then you will need to refine your query, each selection is know as a block.  Here is code assuming 1 continuous block:

Private Sub wndDatePicker_SelectionChanged()
    If wndDatePicker.Selection.BlocksCount = 1 Then
        Debug.Print wndDatePicker.Selection.Blocks(0).DateBegin
        Debug.Print wndDatePicker.Selection.Blocks(0).DateEnd
    End If
End Sub



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