event question for a time input field

Discussion in 'Javascript' started by JRough, Feb 2, 2012.

  1. JRough

    JRough Guest

    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
    JRough, Feb 2, 2012
    #1
    1. Advertising

  2. JRough

    Erwin Moller Guest

    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
    Erwin Moller, Feb 2, 2012
    #2
    1. Advertising

  3. In comp.lang.javascript message <085b2fe7-5c2f-467c-86cc-ffa45eaf2355@og
    8g2000pbb.googlegroups.com>, Thu, 2 Feb 2012 10:46:17, JRough
    <> 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.
    Dr J R Stockton, Feb 3, 2012
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?ISO-8859-15?Q?Josef_Bl=F6sl?=
    Replies:
    1
    Views:
    25,800
  2. flamesrock
    Replies:
    8
    Views:
    438
    Hendrik van Rooyen
    Nov 24, 2006
  3. David Hearn
    Replies:
    1
    Views:
    407
    David Hearn
    Sep 10, 2003
  4. Sound
    Replies:
    2
    Views:
    430
    Randy Webb
    Sep 28, 2006
  5. jr
    Replies:
    3
    Views:
    409
Loading...

Share This Page