473,808 Members | 2,797 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Month calendar control problem

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
Mar 27 '08 #1
5 2600
On Mar 27, 9:30*am, mabond <mab...@discuss ions.microsoft. comwrote:
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 MaxSelectionCou nt property? The
default is 7.
Mar 27 '08 #2
Hi Zacks

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

Michael
"za***@construc tion-imaging.com" wrote:
On Mar 27, 9:30 am, mabond <mab...@discuss ions.microsoft. comwrote:
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 MaxSelectionCou nt property? The
default is 7.
Mar 27 '08 #3
On Mar 27, 11:50*am, mabond <mab...@discuss ions.microsoft. comwrote:
Hi Zacks

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

Michael

"za...@construc tion-imaging.com" wrote:
On Mar 27, 9:30 am, mabond <mab...@discuss ions.microsoft. comwrote:
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 MaxSelectionCou nt property? The
default is 7.
Have you checked the values of Selection Start and SelectionEnd
properties after selecting the end date?
Mar 27 '08 #4
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
"za***@construc tion-imaging.com" wrote:
On Mar 27, 11:50 am, mabond <mab...@discuss ions.microsoft. comwrote:
Hi Zacks

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

Michael

"za...@construc tion-imaging.com" wrote:
On Mar 27, 9:30 am, mabond <mab...@discuss ions.microsoft. comwrote:
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 MaxSelectionCou nt property? The
default is 7.

Have you checked the values of Selection Start and SelectionEnd
properties after selecting the end date?
Mar 27 '08 #5
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.
"mabond" <ma****@discuss ions.microsoft. comwrote in message
news:79******** *************** ***********@mic rosoft.com...
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
"za***@construc tion-imaging.com" wrote:
>On Mar 27, 11:50 am, mabond <mab...@discuss ions.microsoft. comwrote:
Hi Zacks

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

Michael

"za...@construc tion-imaging.com" wrote:
On Mar 27, 9:30 am, mabond <mab...@discuss ions.microsoft. comwrote:
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 MaxSelectionCou nt property? The
default is 7.

Have you checked the values of Selection Start and SelectionEnd
properties after selecting the end date?
Mar 27 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
6978
by: bb | last post by:
any way to prevent displaying the previous and next months in the calendar control? i have tried just blanking the text out in the dayrender IsOtherMonth and also dynamically changing the FirstDayOfWeek to day 1 of the month. but neither works properly. (the boxes still appear just with no text in them) i want the calendar to start on day 1 of month and end on Day 31 (with acceptable trailing blanks between day 31 and the end of that...
8
1904
by: tfsmag | last post by:
i need to create a date range based on the current "shown" month on a calendar control to query a database and populate a datagrid based on that date range. how can i retrieve the "shown" month and year from the calendar control to create this range. Here is what i was thinking, all i need is the "shown" month and year to complete. ----------------------------------------------- Dim themonth as string = (need code to retreive "shown"...
34
9301
by: prosoft | last post by:
When I use Dim myDTFI As DateTimeFormatInfo = New CultureInfo("he-IL", True).DateTimeFormat Dim strhmon1 As String = (myDTFI.GetMonthName(hmon1)) MsgBox(strhmon1) I get the local name of the gregorian month. How do I get the local name of the local month ? Tia
4
6701
by: Jason Chan | last post by:
How can I get the month and year a calendar control current displaying? My problem is I want to load a list of event to a calendar so that it display difference style if there a event for a day. My initial idea is load all events from database and store it in a DataTable. In the DayRender event, loop thr the DataTable and see if it equal to e.Day and alter the style if that is. However when the event table is large, it hurt...
0
1906
by: larry | last post by:
I am in the process of rewriting one of my first PHP scripts, an event calendar, and wanted to share the code that is the core of the new calendar. My current/previous calendar processed data dates only, this code is intended to use more thrifty event descriptions (3rd saturday, last tuesday, etc.) as well as traditional one-of dates. The core here here is quite spartan, no table logic or or db cruft included (I figure you have our own...
22
31214
by: Stan | last post by:
I am working with Access 2003 on a computer running XP. I am new at using Access. I have a Db with a date field stored as mm/dd/yyyy. I need a Query that will prompt for the month, ie. 6 for June, and will return all records in that month.
7
3830
by: ajaydesai | last post by:
I have JavaScript code to dispaly two month calendar days at a time, but i have a problem both month that disaplay at a time have same days (for example May and June has same days, June and July have same days etc.) Instate of correct days. Here is my code from 3 files. *************************************************************************************** calendr.js file: isIE = (document.all ? true : false); isDOM =...
11
7393
by: Randy | last post by:
I have a MonthCalendar on one of my forms. I have disovered that the DateChanged event is triggered not only when the user clicks on a new date, but also if they click on the Previous or Next Month arrows (meaning they click on either of the left or right pointing arrows in the top corner). If the user changes the month, it messes up some of the date logic that I have in the DateChanged event. Does anybody know how I can capture this...
1
1499
by: Mufasa | last post by:
So I have a calendar control - and I have it automatically select last week. So this week it selected 8/24/2008 and 8/30/2008 which is what I want. Problem is - it's showing September. How can I get it to show the month that the value is selected in? TIA - Jeff.
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10373
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10374
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10113
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9195
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6880
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.