Solved

Calendar - Select a period

Posted on 2003-10-22
7
354 Views
Last Modified: 2010-05-01
I'd like to select not just a day but a period with calendar (multiple days)
Does anyone know a way to do that?
0
Comment
Question by:meciab
7 Comments
 

Expert Comment

by:Eddiebaby
ID: 9598728
I don't think that you can do this with just one calendar control.

The best thing to do is to have two calendar controls, with the user selecting the from date in the first box and the to date in the second.

Add validation code to ensure that the date range is valid - e.g that the first date is older than the second.

Ed
0
 

Author Comment

by:meciab
ID: 9598784
Yes I ever user this solution but it doesn't fit with my needs cos' I want for exemple select monday an wedneday of two weeks.
0
 
LVL 39

Accepted Solution

by:
appari earned 500 total points
ID: 9598794
you can use monthview control
in vb ide press CTRL+T select  microsoft windows common controls-2 6.0. you can see monthview control.
set MultiSelect property to true.
set MaxSelCount tono of days you want to allow to select.

from selection

MsgBox MonthView1.SelStart    returns start day selected
MsgBox MonthView1.SelEnd      returns end day selected
 
0
ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

 

Author Comment

by:meciab
ID: 9599218
Thanks but even with multiselect property you can't select (even with ctrl) for exemple the 1,4,13,19 and 28 of the month.
And if you display 3 months you can't select a period on this 3 months you can just select a period on the same month.
0
 

Author Comment

by:meciab
ID: 9599417
...oupss sorry you can select a continuous period on 3 months. But you can't select a discontinuous period
0
 

Expert Comment

by:eliaslopezgtz
ID: 9601156
you can create a custom control that loads calendar controls at run time... and get the intervals you need.
0
 
LVL 5

Expert Comment

by:JCinDE
ID: 9601862
Use a listbox to display selected dates and a DatePicker control to add new ones. It's not as pretty as having the calendar highlight all the days, but it's functional.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
vb6 programatically bring window to front 8 72
Specify ip address in my connection string for sas 2 59
VBA error replacing data 6 40
Macro Excel - Multiple If conditions 2 72
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question