473,386 Members | 1,785 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,386 software developers and data experts.

datepicker help needed

TJS
found this code but get error message on handles
Compiler Error Message: BC30506: Handles clause requires a WithEvents
variable.

can anyone help resolve this ??
============================================
'Just drag calendar control onto the screen and turn it invisible.
'When you click a button, like "Get Date" or a picture of a calendar, turn
it visible:

Private Sub calTo_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs) Handles calTo.Click
Me.Calendar2.Visible = True
Me.Calendar2.BackColor = White
End Sub

'Then when you select a date, store it in a text box, check an option
button,
turn the calendar invisible and store the date in the session object for
'future use such as when you return to the page for a 2nd search.

Private Sub Calendar1_SelectionChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Calendar1.SelectionChanged

Me.txtDateFrom.Text = Me.Calendar1.SelectedDate.ToShortDateString
Me.optFrom.Checked = True
Me.Calendar1.Visible = False
Session("txtDateFrom") = txtDateFrom.Text.ToString

End Sub
============================================
Nov 17 '05 #1
2 1610
How many calendars do you have on the page?

Your code suggests three:

calTo.Click
Calendar1.SelectionChanged
Me.Calendar2.Visible

Is it just a naming mixup?

Anyway, sometimes VS.NET gets mixed up with the adding and removing of big
controls. You might need to add one again, save all files, rename it to
match the name you want to use and save again.

Let us know?
"TJS" <no****@here.com> wrote in message
news:OK**************@TK2MSFTNGP12.phx.gbl...
found this code but get error message on handles
Compiler Error Message: BC30506: Handles clause requires a WithEvents
variable.

can anyone help resolve this ??
============================================
'Just drag calendar control onto the screen and turn it invisible.
'When you click a button, like "Get Date" or a picture of a calendar, turn
it visible:

Private Sub calTo_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs) Handles calTo.Click
Me.Calendar2.Visible = True
Me.Calendar2.BackColor = White
End Sub

'Then when you select a date, store it in a text box, check an option
button,
turn the calendar invisible and store the date in the session object for
'future use such as when you return to the page for a 2nd search.

Private Sub Calendar1_SelectionChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Calendar1.SelectionChanged

Me.txtDateFrom.Text = Me.Calendar1.SelectedDate.ToShortDateString
Me.optFrom.Checked = True
Me.Calendar1.Visible = False
Session("txtDateFrom") = txtDateFrom.Text.ToString

End Sub
============================================

Nov 17 '05 #2
TJS
hmmm..

not sure what the 3 references mean as I found this example.
I am just hopiong to find some help in getting the code sample cleaned up so
it can work. :)

Also I am not using VS.net I am using web matrix.
"Oliver" <DE*******************@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
How many calendars do you have on the page?

Your code suggests three:

calTo.Click
Calendar1.SelectionChanged
Me.Calendar2.Visible

Is it just a naming mixup?

Anyway, sometimes VS.NET gets mixed up with the adding and removing of big
controls. You might need to add one again, save all files, rename it to
match the name you want to use and save again.

Let us know?
"TJS" <no****@here.com> wrote in message
news:OK**************@TK2MSFTNGP12.phx.gbl...
found this code but get error message on handles
Compiler Error Message: BC30506: Handles clause requires a WithEvents
variable.

can anyone help resolve this ??
============================================
'Just drag calendar control onto the screen and turn it invisible.
'When you click a button, like "Get Date" or a picture of a calendar, turn it visible:

Private Sub calTo_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs) Handles calTo.Click
Me.Calendar2.Visible = True
Me.Calendar2.BackColor = White
End Sub

'Then when you select a date, store it in a text box, check an option
button,
turn the calendar invisible and store the date in the session object for
'future use such as when you return to the page for a 2nd search.

Private Sub Calendar1_SelectionChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Calendar1.SelectionChanged

Me.txtDateFrom.Text = Me.Calendar1.SelectedDate.ToShortDateString
Me.optFrom.Checked = True
Me.Calendar1.Visible = False
Session("txtDateFrom") = txtDateFrom.Text.ToString

End Sub
============================================


Nov 17 '05 #3

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

Similar topics

0
by: Always Learning | last post by:
Hi Guys, I have a form field of type datepicker. I want to include it in my get string. like this: Response.Redirect("writetodb.asp?Name=" + Textbox1.Text + "&Telephone=" + TextBox2.Text +...
0
by: Always Learning | last post by:
Hi Guys, I have a form field of type datepicker. I want to include it in my get string. like this: Response.Redirect("writetodb.asp?Name=" + Textbox1.Text + "&Telephone=" + TextBox2.Text +...
7
by: Malcolm Webb | last post by:
I use the Microsoft Access Calendar (ActiveX) to pass dates into queries and reports. I have recently come across the Microsoft Access DatePicker developed by Brendan Kidwell and I now use this...
2
by: G .Net | last post by:
Hi Can anybody help me with setting the allowable Max and Min date for a DatePicker? I would like to restrict the possible date selections to a given month. So for example, if I were to...
2
by: stainless | last post by:
I have a date selection field that can be blank OR set to a valid future date. I am thinking of using a datepicker field but have one issue with this. If I have a check box in the datepicker...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.