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
I once needed a data and time input in a SAS/AF application that may have
some relevance here, for the date I used a standard calendar, and for the
time I used a dialog that required 2 clicks to input the time, one to set
hour, by clicking on fields labeled 0-23, with am/pm option.
Hour:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
AM PM
The 0-23 was actually a single field and I got the mouse location to
determine the hour, the am/pm was a radio set (SAS choice group)
The minutes I handled by creating a single 60 column text widget with 2
rows of numbers in a monospace font that looked like (sorry if they don't
line up here):
Minute:
0----|----1----|----2----|----3----|----4----|----5----|----0
012345678901234567890123456789012345678901234567890123456789
where each minute was represented by a vertical set of numbers/symbols
for 0-5 and 0-9. A click on this field was intercepted, and the horizontal
location retrieved to determine the minute value.
Other fields displayed the selected time, and offset from "now". A
custom prompt string was passed to the routine, and final OK button press
was optionally required.
I haven't done this in JavaScript so I don't know how the logistics of
determining click offest on a fixed font, and popup non-modality would
actually come together, but the SAS implementation worked very well, and was
one of my most heavily used utility subs for database input.
zin
--
http://www.zintel.com