LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX calendar for multi selections

I'm trying to make a calendar that would allow the user to select multiple days. Currently I am trying ActiveX calendars, specifically the Microsoft Calendar Control 11.0. I gave up trying to make clicks toggle the highlight on days; it seems the control will only highlight one day. Workaround is to have an array of strings showing which days have been selected.
My problem now is I would like the user to be able to select a whole month or year. I created two buttons for this purpose, but it seems if the user changes the month or year combo boces in the ActiveX control and doesn't click on a day, the Month and Year properties return 0. I found this page at Microsoft with a workaround:
but I have no idea how to implement this article, or if I even can with LV ActiveX controls.
 
Is there a better way? Any ideas? Has anyone implemented something similair?
 
Michael
0 Kudos
Message 1 of 10
(5,325 Views)
Unfortunately, I can't open your VI since I only have 8.5. I would suggest looking at the .NET calendar control, as it has a built-in range for selected dates. It defaults to a maximum of 7, but you can change this. The limitation is that the range must be contiguous, and it's not clear from your description whether you need to be able to select non-contiguous ranges.
0 Kudos
Message 2 of 10
(5,293 Views)

Thanks, I actually did end up switching to that calendar (Microsoft Monthview, right?). I played around with the multiple date select on it, but couldn't get a Value Change event to work, or a Mouse Up, so I ended up using a Mouse Down event, which didn't fit well with the multiple date select. Instead I have a string indicator beside the calendar showing which dates have been selected. Not what I envisioned, but it works.

Interesting enough, to get the Mouse Down event to work how I wanted it to, I had to turn Multiselect on and set the number of dates possible to select as 1. Otherwise the Mouse Down event would have the previous value.

Thanks for helping!

Michael

0 Kudos
Message 3 of 10
(5,288 Views)
The control is called MonthCalendar, not sure what MonthView is. You might want to take a look at the .NET examples that ship with LabVIEW (Help->Find Examples, and search for ".NET"). One of them is called "NET Event Callback for Calendar Control" that handles a DateChanged event using a callback VI.
0 Kudos
Message 4 of 10
(5,286 Views)

Hello

I am trying to select two dates from the calendar for my program, as begin and end date, but for some reason I can't do it

 

Arjun

0 Kudos
Message 5 of 10
(4,719 Views)
You will need to provide more information. What control are you trying to use? The ActiveX one, or the .NET one? Which one, specifically? What does your code look like? Please upload it.
0 Kudos
Message 6 of 10
(4,701 Views)

I am trying to use a .net control. It doesn't matter, if you want me to do it in .net or activeX as long as you can get it to work.Just getting two dates from the same calendar, is possible and how?

 

Thanks

Arjun

0 Kudos
Message 7 of 10
(4,692 Views)

The .NET MonthCalendar control does not have the capability to select two non-contiguous dates. You can select a range. I'm not aware of a .NET calendar that can do what you ask, but that doesn't mean one doesn't exist. As far as I know, the ActiveX one can't do that either. You can try Google to see if one exists.

 

Or, you could just use two controls.

0 Kudos
Message 8 of 10
(4,676 Views)

If you can use .NET then try using the example called NET Event Callback for Calendar Control(you can find this in the example finder - Help Menu > Find Examples... and search for ".net")

 

Cheers,

--Michelle

National Instruments
0 Kudos
Message 9 of 10
(4,675 Views)
thanks..
0 Kudos
Message 10 of 10
(4,664 Views)