DatePicker .NET compatibility |
Post Reply |
Author | |
simus
Groupie Joined: 08 July 2005 Status: Offline Points: 43 |
Post Options
Thanks(0)
Posted: 25 September 2007 at 6:13am |
Hi,
I use the ActiveX DatePicker in C# .NET application.
.NET generate the Interop dlls and the DatePicker works fine.
The problem I have is regarding the selected blocks of dates.
In the Selection object of type DatePickerSelection I do not see the Blocks property. I think it is Interoperability problem of properties with arguments
So I cannot get the selected dates
Does anyone have an idea about that? Is there a way to get Selected dates via another entry point?
Thanks a lot!
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Think you forgot indexer:
private void wndDatePicker_SelectionChanged(object eventSender, System.EventArgs eventArgs)
{ System.DateTime DateMin = DateTime.MinValue; System.DateTime DateMax = DateTime.MinValue; if (wndDatePicker.Selection.BlocksCount == 1)
{ DateMin = wndDatePicker.Selection[0].DateBegin; DateMax = wndDatePicker.Selection[0].DateEnd; if (DateMin == DateMax) System.Diagnostics.Debug.WriteLine("SelectionChanged. Date = " + DateMin); else System.Diagnostics.Debug.WriteLine("SelectionChanged. Min Date = " + DateMin + ", Max Date = " + DateMax); } else if (wndDatePicker.Selection.BlocksCount > 1) { DateMin = wndDatePicker.Selection[0].DateBegin; DateMax = wndDatePicker.Selection[wndDatePicker.Selection.BlocksCount - 1].DateEnd; System.Diagnostics.Debug.WriteLine("SelectionChanged. Total Selected Blocks = " + wndDatePicker.Selection.BlocksCount + ", Min Date = " + DateMin + ", Max Date = " + DateMax);
} else System.Diagnostics.Debug.WriteLine("SelectionChanged. No Selection"); } |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
simus
Groupie Joined: 08 July 2005 Status: Offline Points: 43 |
Post Options
Thanks(0)
|
Ooops, yes indeed.
I was focused on foreach.
Thank you
|
|
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 |