473,796 Members | 2,482 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

time picker in asp.net page

I have been programming in asp.net w/ vb for 3 years now and I feel a need
to include more client side script with javascript so here I am. Hopefully
in the right place. I have a timecard web app that I need to pick a starting
time in hour and minutes 3 times a day for 15 days. On the form I would like
to hit a button on Manday and popup an hour dropdown and minute dropdown and
submit them to the page without the page doing a postback. The minute
dropdown will only be every 15 minutes. Resulting in a textbox with
something like this > 14:30.
thanks in advance for any help offered
Dec 4 '05 #1
3 9140


Not sure if it may be just me, but I don't see the JS part of it yet,
though I can see it has one, but I don't follow what interactivity is
needed or processed.
Danny
Dec 4 '05 #2
Danny wrote on 04 dec 2005 in comp.lang.javas cript:
Not sure if it may be just me, but I don't see the JS part of it yet,
though I can see it has one, but I don't follow what interactivity is
needed or processed.


No one of us sees anything
if you do not quote where you are talking about.

This is usenet.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Dec 4 '05 #3
bg
Lee, this is perfect.
Note that I will have 14 days on thr form and a possible 3 in - outs for
each day.
Is there a way, or how can I make the picker float or move to the current
day button.
I am sure it it tied to " #timepicker {position:absol ute;
top:50px;left:5 0px;".
thanks again,
dng

"Lee" <RE************ **@cox.net> wrote in message
news:dm******** *@drn.newsguy.c om...
DotNetGuy said:

I have been programming in asp.net w/ vb for 3 years now and I feel a need
to include more client side script with javascript so here I am. Hopefully
in the right place. I have a timecard web app that I need to pick a
starting
time in hour and minutes 3 times a day for 15 days. On the form I would
like
to hit a button on Manday and popup an hour dropdown and minute dropdown
and
submit them to the page without the page doing a postback. The minute
dropdown will only be every 15 minutes. Resulting in a textbox with
something like this > 14:30.
thanks in advance for any help offered


Here's one way to do what I think you're asking for.
Note that it doesn't matter that this is an asp.net page.
The browser doesn't know or care how the page content was produced.
Note also that nothing is submitted and no new windows pop up.

<html>
<head>
<style type="text/css">
BUTTON {width:20em}
#timepicker {position:absol ute;
top:50px;left:5 0px;
visibility:hidd en;
border-style:solid;
border-width:1px;
background-color:wheat;
padding:2em;}
</style>
<script type="text/javascript">
function timepick(n) {
globalN=n;
document.getEle mentById("timep icker").style.v isibility="visi ble";
}
function setTime(f) {
if(f) {
var HHMM=f.HH.optio ns[f.HH.selectedIn dex].text;
HHMM+=":"+f.MM. options[f.MM.selectedIn dex].text;
document.getEle mentById("day"+ globalN).innerH TML=HHMM;
}
document.getEle mentById("timep icker").style.v isibility="hidd en";
}
</script>
</head>
<body>
<button onclick="timepi ck(0)">Monday 2005-12-05</button>
<span id="day0" class="time">HH :MM</span><br>
<button onclick="timepi ck(1)">Tuesday 2005-12-06</button>
<span id="day1" class="time">HH :MM</span><br>
<button onclick="timepi ck(2)">Wednesda y 2005-12-07</button>
<span id="day2" class="time">HH :MM</span><br>
</button>
<div id="timepicker" >
<form>
<select name="HH">
<option>06</option>
<option>07</option>
<option selected>08</option>
</select>
<select name="MM">
<option selected>00</option>
<option>15</option>
<option>30</option>
<option>45</option>
</select>
<br><br>
<input type="button" value="OK" onclick="setTim e(this.form)">
<input type="button" value="Cancel" onclick="setTim e(false)">
</form>
</div>
</body>
</html>

Dec 5 '05 #4

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

Similar topics

2
14547
by: john | last post by:
Can someone give me a url of a time picker? I found a lot of date/time picker but no timepicker alone. I just want a time picker. Thanks.
5
7107
by: Adrian Parker | last post by:
Hi. I have a date time picker in my program which uses ADO to read from an Access database. It works perfectly, unless the database is empty (no records) when opened. When you try to open an empty database, the date time picker returns error 545. Any attempts to progmatically add new records after the empty database has been opened returns, or to use the DTP and set a new date for those added records, "Field not updateable, Bound...
4
25705
by: timmy_dale12 | last post by:
I have a time field in an application. I am looking for some kind of pop up function that lets me insert a time. So its like a calendar pop up but you can choose a valid time instead of a date Has anybody here made such a function or know a link to any exampels Thanks
3
5246
by: TD | last post by:
This code doesn't work. Every posting I can find suggests that it should. If TypeOf controlname Is DTPicker then do something here End If I am using the Date Time Picker control and wish to use TypeOf to determine if the controlname is indeed a Date Time Picker control.
7
10782
by: XmlAdoNewbie | last post by:
Hi All, I am wondering if it is possible to allow nulls or empty strings when it comes to the datetimepicker control. I have an app with a few datetimepickers on it and there are some instances when i don't want a date to show at all but the datetimepickers always have at least todays date in it so when i go to press the save button on my app there is always a date stored in the retrieved field. Is there a way to say "hey i don't want a...
2
3956
by: Need Helps | last post by:
The example given in msdn.com on how to create a Date Time Picker involves using the CreateWindowEx function. However, I created a dialog box using the graphical interface, and then used the graphical interface to add a Date Time Picker control to it. The only problem is, I don't know how to do anything with the Date Time Picker, like access the date selected within the control. All I have is the ID, which in my code is IDC_DATETIMEPICKER1. ...
4
2673
by: Michael Turner | last post by:
Hi Guys I have two DateTime pickers one shows the Date and the other the time, this is a requirement of the solution. The problem I have is that when the time is saved to the sql database into a datetime field it uses the default date which is a problem when I try to sort, what I wanted to know is there a way for me to set the date in the time picker to the date in the date picker? Any help greatly appreciated.
4
4877
by: Michel Posseth [MCP] | last post by:
I have a problem with the date time picker validate event wich i believe is a bug How to reproduce : throw on a form a date time picker control and a textbox control select the validating event of the control and add this code
0
2846
by: fredloh | last post by:
i have a tab control on my form. i then have several microsoft date and time picker control on the tab control. when i select a date on any of the date and time picker control, the result of the control's value is always 12:00:00 am instead of the date i selected even though the date displays correctly on the date and time picker control. the controls are unbound. why is this? i also have another identical form where the date and...
0
9673
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
10452
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
10221
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
10169
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
10003
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
6785
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();...
0
5440
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...
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2924
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.