473,394 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Month Calendar tool

4
Hi,
Iam using a MonthCalendar.I have hosted this in a popup control.On click of an image,i get my month calendar(i.e. the popup) displayed.Once i choose the date ,the selected date gets populated in the textbox and the calendar closes.But this closing of the calendar happens only for the first time .The next time i try to open it and choose a different date,The popup control doesnt close.
Can anybody help me out with this.

I have written the code in DateChanged and DateSelected events.
Iam using C# code.

Thanks,
Droopy
Jul 9 '08 #1
3 1238
cloud255
427 Expert 256MB
Could you post some of your code so that we may have a better understanding of what is happenning?
Jul 9 '08 #2
Droopy
4
Expand|Select|Wrap|Line Numbers
  1. private void monthCalendar1_DateSelected_1(object sender, DateRangeEventArgs e)
  2.         {
  3.             textBox2.Text = monthCalendar1.SelectionEnd.ToShortDateString();
  4.             textBox2.Text = monthCalendar1.SelectionStart.ToShortDateString();
  5.  
  6.             nPopup3.Close();
  7.         }
  8.  
  9. private void monthCalendar1_DateChanged(object sender, DateRangeEventArgs e)
  10.         {
  11.             textBox2.Text = monthCalendar1.SelectionEnd.ToShortDateString();
  12.             textBox2.Text = monthCalendar1.SelectionStart.ToShortDateString();
  13.             nPopup3.Close();
  14.  
  15.         }
  16.  
  17.  
  18.  
this is my code for selecting a date from the month-calendar and displaying it in the corresponding textbox.As i have mentioned earlier,the calendar control(or the popup) doesnt close after i select the date for the second time.
Please do help me with this.

Thanks,Droopy
Jul 10 '08 #3
cloud255
427 Expert 256MB
Well you do indeed tell the pop up to close, try inserting some break points and making sure that the events are being called. based on the code you supplied i would think that the monthCalendar1_DateChanged event handler is not being executed.

also check how many times the pop up is being shown, it may be possible that more than one instance is called.

Perhaps someone wiser than me can see another issue...
Jul 10 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

20
by: Laguna | last post by:
Hi Gurus, I want to find the expiration date of stock options (3rd Friday of the month) for an any give month and year. I have tried a few tricks with the functions provided by the built-in...
2
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...
34
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...
4
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....
10
by: Bill | last post by:
Hello -- I'm parsing the output of the finger command, and was wondering something...If I'm given a month abbrievation (such as "Jan"), what's the best way to figure out the month number? I see...
0
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...
6
by: Zeba | last post by:
Hi, I have a page with a calendar and two datalist items - one containing month values and the other, year values. Depending on the month/year value chosen ( in text/string format ) I should be...
7
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...
5
by: =?Utf-8?B?bWFib25k?= | last post by:
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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...
0
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...

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.