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
    The best would be the YUI 3 timepicker but this is YUI 2 and I just
    want to see if this works first.
    J R
    JRough, Feb 2, 2012
    1. Advertisements

  2. JRough

    Erwin Moller Guest


    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.

    Erwin Moller
    Erwin Moller, Feb 2, 2012
    1. Advertisements

  3. In comp.lang.javascript message <[email protected]
    8g2000pbb.googlegroups.com>, Thu, 2 Feb 2012 10:46:17, JRough
    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.
    Dr J R Stockton, Feb 3, 2012
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.
Similar Threads
There are no similar threads yet.