Looking for Javascript Date Picker

H

Hussein Patwa

Hi there.

I'm new to this group. I'm also partially sighted so navigating the web is
sometimes quite difficult.

I'm looking for a javascript date picker, you know the ones that travel
sites use for selecting the departure and arrival dates. I've had a look at
some sites, but mostly found calendars. I want to make mys tie accessible,
so I really want the three scroll boxes for the day, month and year.

Thanks for any help, much appreciated.

Hussein.
 
P

Philip Ronan

Hussein said:
Hi there.

I'm new to this group. I'm also partially sighted so navigating the web is
sometimes quite difficult.

I'm looking for a javascript date picker, you know the ones that travel
sites use for selecting the departure and arrival dates. I've had a look at
some sites, but mostly found calendars. I want to make mys tie accessible,
so I really want the three scroll boxes for the day, month and year.

Here's one:

http://freespace.virgin.net/phil.ronan/junk/date.html
 
D

Dr John Stockton

JRS: In article <[email protected]>, dated Sat, 23
Oct 2004 11:59:47, seen in Hussein Patwa
I'm new to this group.

So you should read the FAQ of the newsgroup, posted thrice weekly, bi-
partly.
I'm also partially sighted so navigating the web is
sometimes quite difficult.
:-(


I'm looking for a javascript date picker, you know the ones that travel
sites use for selecting the departure and arrival dates.

Be aware that it's about twice as quick to type the date in, in a
stipulated numeric format such as DD/MM/YYYY or YYYY-MM-DD. If
required, the date can easily be verified as a valid Gregorian Calendar
date. Details via NG FAQ, or more directly via signature below.

I've had a look at
some sites, but mostly found calendars. I want to make mys tie accessible,
so I really want the three scroll boxes for the day, month and year.

Year, month, and day would be better. Only when the month is identified
can its length, and hence the range of the day field, be determined.

Think carefully before using a javascript picker; that should not be
allowed to be the cause of the site becoming inaccessible to those
without javascript operating.

See <URL:http://www.merlyn.demon.co.uk/js-date6.htm#DDD>.

For some purposes, the style of date picker shown below that might be
preferred.
 
P

Philip Ronan

Dr said:
Be aware that it's about twice as quick to type the date in, in a
stipulated numeric format such as DD/MM/YYYY or YYYY-MM-DD. If
required, the date can easily be verified as a valid Gregorian Calendar
date. Details via NG FAQ, or more directly via signature below.

I think you'll find that most browsers allow you to change the contents of
drop-down menus by typing in the required value. So I would say drop-down
menus are preferable in any situation.
Year, month, and day would be better. Only when the month is identified
can its length, and hence the range of the day field, be determined.

You can control the presentation order of these fields, but you don't have
any control over the order in which they are filled in. Making dynamic
changes to the "Date" menu is a neat trick, but I'm not convinced it's
actually all that helpful.
 
R

Randy Webb

Philip said:
Dr John Stockton wrote:




I think you'll find that most browsers allow you to change the contents of
drop-down menus by typing in the required value. So I would say drop-down
menus are preferable in any situation.

While its true that they allow you to change select lists, I can type my
birthdate in (the #1 date asked for), a lot faster than I can find it in
a select list. Not to mention the time it takes to scroll down to
December (or 12), then down to 22, and then down to 1966 or 66,
depending on how its set up.


--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?
 
P

Philip Ronan

Randy said:
While its true that they allow you to change select lists, I can type my
birthdate in (the #1 date asked for), a lot faster than I can find it in
a select list. Not to mention the time it takes to scroll down to
December (or 12), then down to 22, and then down to 1966 or 66,
depending on how its set up.

Huh? So type it in. If the value you're entering exists in the menu, it will
appear as soon as you type in enough characters to identify it. So for
example to select "December" in the month menu, just select it and press
"D". You don't need to scroll anything. Read my last post again.
 
P

Philip Ronan

Philip said:
to select "December" in the month menu, just select it and press "D"

Sorry, that wasn't clear.

Move the focus to the "Month" drop-down menu, then press "D".

Basically the keystrokes are the same as for text input boxes, but with an
autocomplete function so you don't necessarily have to type in the whole
date.
 
R

Randy Webb

Philip said:
Randy Webb wrote:




Huh? So type it in. If the value you're entering exists in the menu, it will
appear as soon as you type in enough characters to identify it. So for
example to select "December" in the month menu, just select it and press
"D". You don't need to scroll anything. Read my last post again.

And how does that make it "Better" or "Quicker" when attempting to find
22 or 1966 in a menu? So no, its not "preferable in any situation". I
prefer the input type="text" style.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?
 
R

Randy Webb

Philip said:
Philip Ronan wrote:




Sorry, that wasn't clear.

Move the focus to the "Month" drop-down menu, then press "D".

Not sure why you think that wasn't clear, but to each his own.
Basically the keystrokes are the same as for text input boxes, but with an
autocomplete function so you don't necessarily have to type in the whole
date.

When I type, out of habit, December on a select list as follows:

<select>
<option>January</option>
<option>Feb</option>
<option>Mar</option>
<option>Apr</option>
<option>May</option>
<option>June</option>
<option>July</option>
<option>August</option>
<option>September</option>
<option>October</option>
<option>November</option>
<option>December</option>
</select>

March is what is selected, not December, so no, the keystrokes are not
the same.

May nor Mar give me May or March, it gives me April.

Shall I continue with key combinations that do not give the intended
results or do you propose that I should hit the tab key to gain focus,
type Ma and look to see what it gives me? Or, can I do as I normally do
and just continuously type?

Whether you like Selects or Text Inputs is a matter of personal choice.
You prefer Selects, I prefer Text Inputs. Neither of us is right,
neither of us is wrong. We can argue about it until dooms-day and its a
no-win argument.
 
P

Philip Ronan

Randy said:
When I type, out of habit, December on a select list as follows:

<select>
<option>January</option>
<option>Feb</option>
<option>Mar</option>
<option>Apr</option>
<option>May</option>
<option>June</option>
<option>July</option>
<option>August</option>
<option>September</option>
<option>October</option>
<option>November</option>
<option>December</option>
</select>

March is what is selected, not December, so no, the keystrokes are not
the same.

I wonder what the keystrokes for "December" might be then?

Perhaps there's something wrong with your browser.
 
D

Dr John Stockton

JRS: In article <BDA15306.245DE%[email protected]>, dated Sun, 24
Oct 2004 12:39:35, seen in Philip Ronan
I think you'll find that most browsers allow you to change the contents of
drop-down menus by typing in the required value. So I would say drop-down
menus are preferable in any situation.

Entering "Mar" in a TLA month box gives me "Apr". "May" -> "Aug". "Aug"
-> "Apr".

Non-expert users will find entering into three boxes slower than entering
space-separated items into a text box (one can define the allowable
separators as \D+ \D+ or as \D+ \1).

You can control the presentation order of these fields, but you don't have
any control over the order in which they are filled in. Making dynamic
changes to the "Date" menu is a neat trick, but I'm not convinced it's
actually all that helpful.

Most users will enter data from left to right. One has influence, if not
control.

It occurs to me that it might be useful to add day-of-week TLA to the
date box entries; this would mean reloading the whole date drop-down on
(almost) any change of month and year. Sometimes, one may know the
desired day-of-week better than the desired date.
 
R

Randy Webb

Philip said:
Randy Webb wrote:




I wonder what the keystrokes for "December" might be then?

Perhaps there's something wrong with your browser.

Its IE6 SP2 running on Windows XP SP2.

When tested in Opera, and I type D E C E M B E R, January remains chosen
unless I open the drop down and then type.

Mozilla is the only one of the three that does what you say it should do
and it does indeed leave December chosen when I type D E C E M B E R.
And Mozilla is my preferred browser, but it is far from the predominant
browser on the 'net, and when testing scripts, I typically test it in IE
first simply because that is the predominance of browsers then I go to
Mozilla. Personal preference is all.

IE6 is also the only one that adds a scrollbar to that select list.

In Opera 7, typing M A R C H leaves May selected.
In Mozilla, it gives the right one, leaving March selected.
 
R

Randy Webb

Keep pressing 'm' and cycle through each item beginning with the letter 'm'

So when I want to have May show up, I am supposed to type M M and that
is intuitive to the unknowing?

But I also know, and have stated before, that select lists are a lot
more reliable for user input when the possible knowns are a limited set.
Makes it easier to know its March when you see March than when you Maych
because of a typo.

Consult the FAQ, via signature, especially Section 2.3 paragraph 6.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top