Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #11162 > unrolled thread

event question for a time input field

Started byJRough <janis.rough@gmail.com>
First post2012-02-02 10:46 -0800
Last post2012-02-03 21:46 +0000
Articles 3 — 3 participants

Back to article view | Back to comp.lang.javascript


Contents

  event question for a time input field JRough <janis.rough@gmail.com> - 2012-02-02 10:46 -0800
    Re: event question for a time input field Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-02-02 23:27 +0100
    Re: event question for a time input field Dr J R Stockton <reply1205@merlyn.demon.co.uk> - 2012-02-03 21:46 +0000

#11162 — event question for a time input field

FromJRough <janis.rough@gmail.com>
Date2012-02-02 10:46 -0800
Subjectevent question for a time input field
Message-ID<085b2fe7-5c2f-467c-86cc-ffa45eaf2355@og8g2000pbb.googlegroups.com>
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

[toc] | [next] | [standalone]


#11169

FromErwin Moller <erwinmollerusenet@xs4all.nl>
Date2012-02-02 23:27 +0100
Message-ID<4f2b0dcf$0$6848$e4fe514c@news2.news.xs4all.nl>
In reply to#11162
On 2/2/2012 7:46 PM, JRough wrote:
>
> 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


-- 
"That which can be asserted without evidence, can be dismissed without 
evidence."
-- Christopher Hitchens

[toc] | [prev] | [next] | [standalone]


#11179

FromDr J R Stockton <reply1205@merlyn.demon.co.uk>
Date2012-02-03 21:46 +0000
Message-ID<8m7AAEE6WFLPFwKJ@invalid.uk.co.demon.merlyn.invalid>
In reply to#11162
In comp.lang.javascript message <085b2fe7-5c2f-467c-86cc-ffa45eaf2355@og
8g2000pbb.googlegroups.com>, Thu, 2 Feb 2012 10:46:17, JRough
<janis.rough@gmail.com> posted:

>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.

-- 
 (c) John Stockton, nr London UK  ?@merlyn.demon.co.uk  IE8 FF8 Op11 Sf5 Cr15
   news:comp.lang.javascript FAQ <http://www.jibbering.com/faq/index.html>.
   <http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
   <http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web