event question for a time input field

J

JRough

I have a datefield with a YUI calendar object drop down with a
customized time field that is displayed at the bottom of the
calendar. The time field is just an input field that allows the user
to change the time and then a submit button with code that filters the
data based on the date and time of day.


S M T W TH F S
1 2 3 4
5 6 7 8 9 10 11 .................

Time: [ 12:01:60]

What I need to do is attach select drop downs on the time field
object for the hours, minutes, and seconds.
It is heavily customized and fragile code . Is there an event that
would tell me whether
the user clicks on the hours, or minutes or seconds? My idea is just
to take the hours or minutes or seconds that the user
clicks and create a drop down select option list starting with for
example 12:00, 13:00, 14:00, etc. I just want to know how to do
it.
The best would be the YUI 3 timepicker but this is YUI 2 and I just
want to see if this works first.
Thanks,
J R
 
E

Erwin Moller

I have a datefield with a YUI calendar object drop down with a
customized time field that is displayed at the bottom of the
calendar. The time field is just an input field that allows the user
to change the time and then a submit button with code that filters the
data based on the date and time of day.


S M T W TH F S
1 2 3 4
5 6 7 8 9 10 11 .................

Time: [ 12:01:60]

What I need to do is attach select drop downs on the time field
object for the hours, minutes, and seconds.
It is heavily customized and fragile code . Is there an event that
would tell me whether
the user clicks on the hours, or minutes or seconds? My idea is just
to take the hours or minutes or seconds that the user
clicks and create a drop down select option list starting with for
example 12:00, 13:00, 14:00, etc. I just want to know how to do
it.
The best would be the YUI 3 timepicker but this is YUI 2 and I just
want to see if this works first.
Thanks,
J R

JR,

If the code is "heavily customized and fragile" as you claimed, and if
the code is unknown to us, what kind of help do you expect to receive
from this community?

My advice: Study the code yourself, learn Javascript, and fix/modify it
to suit your needs.
If that doesn't work for you, hire a competent coder.

Regards,
Erwin Moller
 
D

Dr J R Stockton

In comp.lang.javascript message <085b2fe7-5c2f-467c-86cc-ffa45eaf2355@og
8g2000pbb.googlegroups.com>, Thu, 2 Feb 2012 10:46:17, JRough
I have a datefield with a YUI calendar object drop down with a
customized time field that is displayed at the bottom of the
calendar. The time field is just an input field that allows the user
to change the time and then a submit button with code that filters the
data based on the date and time of day.

This is a waste of time, because it will be quicker and easier to insert
the numeric date and time from a standard keyboard into a single text
field. If you are explicitly rigorous about the field order, you can be
liberal about the separators, allowing spaces to separate fields. If
your users may not have keyboards, code one with a dozen or so buttons.

Validate the pattern with a RegExp match, and validate the values by
read-back from a Date Object.

If validation fails, allow the input line to be edited; do not force
full re-entry.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,834
Latest member
BuyCannaLabsCBD

Latest Threads

Top