Month calendar control problem

M

mabond

Hi

Using a month calendar control so that my user can select a start and end
date for a range that will be used in a SQL query.

Problem.....if user selects a date in one month and then scrolls to the next
month the "date" moves with the scroll......i.e. click on 3rd Feb and then
move to March, without any further selection being clicked the selected date
has become 3rd March....

How can I click on a single date in one moth and then move to another month
without that selected date being changed to the same day in the new month.

Any help appreciated

Regards

Michael Bond
 
Z

zacks

Hi

Using a month calendar control so that my user can select a start and end
date for a range that will be used in a SQL query.

Problem.....if user selects a date in one month and then scrolls to the next
month the "date" moves with the scroll......i.e. click on 3rd Feb and then
move to March, without any further selection being clicked the selected date
has become 3rd March....

How can I click on a single date in one moth and then move to another month
without that selected date being changed to the same day in the new month.

Any help appreciated

Are you increasing the value of the MaxSelectionCount property? The
default is 7.
 
Z

zacks

Hi Zacks

yes....I've got it set at 56 at present....

Michael

Have you checked the values of Selection Start and SelectionEnd
properties after selecting the end date?
 
M

mabond

Yes

try this

place a month calendar on a form
run the app
scroll to Feb 2008
click on 3rd Feb
scroll to March 2008

What you now see is that the 3rd March is highlighted as if selected. How do
you stop that happening and retaining the 3rd of Feb as the selected date
when you scroll to the next month?

Michael
 
M

Miro

Maybe the solution is to actaully have 2 calendars on the form,
one that just shows the dropdown that is not connected to anything,
and the other that is.

On selection of the one calendar, you can set the date of the other
depending on code.

Just a thought
-Never tried it though.
 
M

mabond

Miro

thanks.....

including your idea there are a number of work-a-rounds.....
use two datetime pickers (one for the user to select the start and one for
the end of the range)
or
enlarge the size of the monthcalendar so that more than one month is on
display at a time

But, my concern is that I'm forced to compromise the appearence of my form
to overcome something that appears to be lacking in the basic design of the
control....I'd like to know if anyone else has come across this problem
before and if there is a solution that will let me use a single control to
select a date range that can span across more than one month in the
monthcalendar control.....

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top