473,624 Members | 2,273 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

popup date picker

ive read a few tutorials but im still not getting anywhere (most code ive
seen is code inline - im using codebehind VB and aspx)

im creating a link button that opens a popup calendar that once a date is
picked it posts back and populates the form
i think i know where the error lies im just unsure how to fix it
my code is like this :-

the form is called form1 and the page is called test.aspx
{
Dim clientscript As String

clientscript = "<script
language='javas cript'>datepick _window=window. open('datepicke r.aspx?formname =
Form1.caltest', 'datepick_windo w','width=300,h eight=300');dat epick_window.fo c
us();</script>"
RegisterStartup Script("openwin dows", clientscript)
}

This succesfully opens a popup window called datepicker.aspx with the
following code :-

Dim strjscript As String = "<script language=""java script"">"
strjscript = "window.opener. " & _
HttpContext.Cur rent.Request.Qu eryString("form 1") & ".caltest = '" &
_Calendar1.Sele ctedDate & "';window.close ();"
strjscript = strjscript & "</script" & ">"
RegisterStartup Script("openwin dows", strjscript)

ive outputted the strjscript string to a label and the output is :-

window.opener.. caltest = '27/03/2004';window.cl ose();

im guessing its to do with the
HttpContext.Cur rent.Request.Qu eryString("form 1") part - but now im totally
stuck!

cheers

mark
Nov 18 '05 #1
2 3501
Do you HAVE to develop the control yourself ?
I'm using the Web DatePicker from this page,
http://www.codeproject.com/vb/net/dw...kerArticle.asp

HTH

Jurjen de Groot
Netherlands.

"luna" <lu**@themoon.c om> wrote in message
news:wQJ0c.2380 $zu.1933@newsfe 1-win...
ive read a few tutorials but im still not getting anywhere (most code ive
seen is code inline - im using codebehind VB and aspx)

im creating a link button that opens a popup calendar that once a date is
picked it posts back and populates the form
i think i know where the error lies im just unsure how to fix it
my code is like this :-

the form is called form1 and the page is called test.aspx
{
Dim clientscript As String

clientscript = "<script
language='javas cript'>datepick _window=window. open('datepicke r.aspx?formname = Form1.caltest', 'datepick_windo w','width=300,h eight=300');dat epick_window.fo c us();</script>"
RegisterStartup Script("openwin dows", clientscript)
}

This succesfully opens a popup window called datepicker.aspx with the
following code :-

Dim strjscript As String = "<script language=""java script"">"
strjscript = "window.opener. " & _
HttpContext.Cur rent.Request.Qu eryString("form 1") & ".caltest = '" &
_Calendar1.Sele ctedDate & "';window.close ();"
strjscript = strjscript & "</script" & ">"
RegisterStartup Script("openwin dows", strjscript)

ive outputted the strjscript string to a label and the output is :-

window.opener.. caltest = '27/03/2004';window.cl ose();

im guessing its to do with the
HttpContext.Cur rent.Request.Qu eryString("form 1") part - but now im totally
stuck!

cheers

mark

Nov 18 '05 #2
Unless you are trying to learn something, be aware that there are many very
good datetextboxes with popup calendars. Some replace Microsoft's
server-side calendar with client side updating of dates. Mine is "Peter's
Date Package" at http://www.peterblum.com/datecontrols/home.aspx. Others are
listed at www.123aspx.com and www.411asp.net.

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlu m.com
Creator of "Profession al Validation And More" at
http://www.peterblum.com/vam/home.aspx

"luna" <lu**@themoon.c om> wrote in message
news:wQJ0c.2380 $zu.1933@newsfe 1-win...
ive read a few tutorials but im still not getting anywhere (most code ive
seen is code inline - im using codebehind VB and aspx)

im creating a link button that opens a popup calendar that once a date is
picked it posts back and populates the form
i think i know where the error lies im just unsure how to fix it
my code is like this :-

the form is called form1 and the page is called test.aspx
{
Dim clientscript As String

clientscript = "<script
language='javas cript'>datepick _window=window. open('datepicke r.aspx?formname = Form1.caltest', 'datepick_windo w','width=300,h eight=300');dat epick_window.fo c us();</script>"
RegisterStartup Script("openwin dows", clientscript)
}

This succesfully opens a popup window called datepicker.aspx with the
following code :-

Dim strjscript As String = "<script language=""java script"">"
strjscript = "window.opener. " & _
HttpContext.Cur rent.Request.Qu eryString("form 1") & ".caltest = '" &
_Calendar1.Sele ctedDate & "';window.close ();"
strjscript = strjscript & "</script" & ">"
RegisterStartup Script("openwin dows", strjscript)

ive outputted the strjscript string to a label and the output is :-

window.opener.. caltest = '27/03/2004';window.cl ose();

im guessing its to do with the
HttpContext.Cur rent.Request.Qu eryString("form 1") part - but now im totally
stuck!

cheers

mark

Nov 18 '05 #3

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

Similar topics

5
11190
by: C. Smith | last post by:
I am a web developer building html data entry forms that have a lot of date input fields (month, date, year) on them. I'd like to have a "popup" calendar that allows the user to pick the date using a graphical calendar interface. For example, the popup would show an entire month of dates and allow the user to scroll to different months/years, and finally double click on a date. The popup then closes and the date is returned (probably as a...
1
2198
by: zeeshan359 | last post by:
Hi, I need free script that is "date and time" picker in javascript without popup, It should be in iframe or div or layers. I shall be thankful to you, if you provide me some details of it. Regards Zeeshan
13
3081
by: Deano | last post by:
Hi, I generate a report using two dates (From and To). I notice if I enter 01/10/2003 that it is interpreted by Access as 10/01/2003 i.e 10th January rather than 1st October as I intended. This is the old problem of US date format mm/dd/yy versus dd/mm/yy. I am stepping through the code and the dates do seem to be ok but when the report runs I get records earlier than 1st October which is not what I want.
3
2108
by: PerryC | last post by:
I have a Main Form, then a subform. There is a date field in the Subform that I want to be able to click on it, and a VBCalendar popup in the main form for me to choose a date (I don't want it on the subform because there is not enough space). After the date is chosen, it will be send back to the subform. Thanks in advance. Sincerely, Perry
2
2306
by: Simon Verona | last post by:
I have a problem, best explained by example. I have a usercontrol which contains a text box and a button. If the button is clicked then the calender control is displayed as a "popup" so that a date can be chosen. This replicates the date-picker control except that it has other checks in it (my user control also has the ability for other data types with other "popups" for validation).... The problem is that if the user control is at...
0
1764
by: TB | last post by:
Hi All: A kind soul provided by with the code for very nice calendar popup, which all in all works fine execpt for one thing: If I pick the current date (i.e. today's date) then the pop-up does not close and the date value is not returned to the target textbox. With any other date, everything works flawlessly, ie the popup closes upon selecting a date and the selected date is transfered to the corresponding textbox. Since I don't want...
4
2959
by: ShyGuy | last post by:
A while back I had found a link to a popup calendar that had a small button that was placed to the right of any text box. By clicking on the icon and selecting a date the text box was updated with that date. You were able to use the icon (button) on multiple text boxes on the form. I have lost the link and can't find any reference to it on my machine. Could someone lead me in the right direction? Thank you.
1
3166
by: vp.softverm | last post by:
hi all . Am facing problem with the date picker. when i click on date picker in a popup window. the date table is opened in the middle of the pop up window. and it is unable to scroll with the pop up window .
0
8233
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
8675
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8474
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...
1
6108
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4078
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4173
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2604
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
1
1784
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1482
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.