![]() |
How do I specify a wndDatePicker date range? |
Post Reply ![]() |
Author | |
Jaymeister ![]() Groupie ![]() ![]() Joined: 27 April 2009 Status: Offline Points: 32 |
![]() ![]() ![]() ![]() ![]() Posted: 07 May 2009 at 10:17am |
I can read a selected date range
Dim D1 As Date, D2 As Date D1 = DateSerial(2009, 8, 31) D2 = DateSerial(2009, 8, 31) wndDatePicker.SelectRange D1, D2 How do I specify a date range? Thanks for any help in advance! |
|
![]() |
|
Jaymeister ![]() Groupie ![]() ![]() Joined: 27 April 2009 Status: Offline Points: 32 |
![]() ![]() ![]() ![]() ![]() |
SORRY - got above post topsy-turvy
I can set a selected date range Dim D1 As Date, D2 As Date D1 = DateSerial(2009, 8, 31) D2 = DateSerial(2009, 8, 31) wndDatePicker.SelectRange D1, D2 How do READ currently set date range? Thanks for any help in advance! |
|
![]() |
|
Jaymeister ![]() Groupie ![]() ![]() Joined: 27 April 2009 Status: Offline Points: 32 |
![]() ![]() ![]() ![]() ![]() |
modded a post I found here... ( https://forum.codejock.com/forum_posts.asp?TID=13251&KW=datepicker&PN=1 )
Sub GetDatePickerSelectedStartStopDates(D1 As Date, D2 As Date) Dim SelectDays() As Date CalcSelectDays NbDays&, SelectDays() D1 = SelectDays(1) D2 = SelectDays(NbDays&) end sub Sub CalcSelectDays(NbDays As Long, SelectDays() As Date) Dim i As Long NbDays = 0 ReDim SelectDays(NbDays) With wndDatePicker.Selection For i = 0 To .BlocksCount - 1 AddSelectDays .Blocks(i).DateBegin, .Blocks(i).DateEnd, NbDays, SelectDays() Next End With End Sub Sub AddSelectDays(DateBegin As Date, DateEnd As Date, Nb As Long, SelDays() As Date) Dim Day As Date Day = DateBegin Do Nb = Nb + 1 ReDim Preserve SelDays(Nb) SelDays(Nb) = Day Day = DateAdd("d", 1, Day) Loop Until Day > DateEnd End Sub ...and it works :) |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |