473,471 Members | 2,008 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Looking for Javascript Date Picker

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.
Jul 23 '05 #1
13 3827
Hussein Patwa wrote:
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

--
Philip Ronan
ph***********@virgin.net
(Please remove the "z"s if replying by email)
Jul 23 '05 #2
JRS: In article <TI************@newsfe5-win.ntli.net>, dated Sat, 23
Oct 2004 11:59:47, seen in news:comp.lang.javascript, Hussein Patwa
<pa***@andrelouis.com> posted :
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.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #3
Dr John Stockton wrote:
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.

--
Philip Ronan
ph***********@virgin.net
(Please remove the "z"s if replying by email)
Jul 23 '05 #4
Philip Ronan wrote:
Dr John Stockton wrote:

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.


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?
Jul 23 '05 #5
Randy Webb wrote:
Philip Ronan 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.


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.

--
Philip Ronan
ph***********@virgin.net
(Please remove the "z"s if replying by email)
Jul 23 '05 #6
Philip Ronan wrote:
Randy Webb wrote:

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

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?
Jul 23 '05 #7
Philip Ronan wrote:
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.

--
Philip Ronan
ph***********@virgin.net
(Please remove the "z"s if replying by email)
Jul 23 '05 #8
Philip Ronan wrote:
Philip Ronan wrote:

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


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.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #9
Randy Webb wrote:
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.

--
Philip Ronan
ph***********@virgin.net
(Please remove the "z"s if replying by email)
Jul 23 '05 #10
q
Keep pressing 'm' and cycle through each item beginning with the letter 'm'

Randy Webb wrote:
Philip Ronan wrote:
Philip Ronan wrote:

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

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.


Jul 23 '05 #11
Philip Ronan wrote:
Randy Webb wrote:

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.


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.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #12
q@q.com wrote:
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?
Jul 23 '05 #13
JRS: In article <BD**************************@virgin.net>, dated Sun, 24
Oct 2004 12:39:35, seen in news:comp.lang.javascript, Philip Ronan
<ph***********@virgin.net> posted :
Dr John Stockton wrote:
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.


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

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.


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.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Jul 23 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Adrian Parker | last post by:
Hi. I have a date time picker in my program which uses ADO to read from an Access database. It works perfectly, unless the database is empty (no records) when opened. When you try to open an...
10
by: vinu | last post by:
I have a javascript file named select.js. This is a file which is use to pop up a calendar, when clicked on a calendar icon in an ASP file. have a close button in the calendar. When i click on the...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
13
by: Deano | last post by:
Hi, I generate a report using two dates (From and To). I notice if I enter 01/10/2003 that it is interpreted by Access as 10/01/2003 i.e 10th January rather than 1st October as I intended. ...
4
by: Rethish | last post by:
Hi All, I am developing an application in VB.net. I am using .Net Datetime picker control to manage the date. But I am not able to assign null/Empty value to the control. I found the property...
4
by: Michael Turner | last post by:
Hi Guys I have two DateTime pickers one shows the Date and the other the time, this is a requirement of the solution. The problem I have is that when the time is saved to the sql database into a...
2
by: sorobor | last post by:
dear sir .. i am using cakephp freamwork ..By the way i m begener in php and javascript .. My probs r bellow I made a javascript calender ..there is a close button ..when i press close button...
0
by: fredloh | last post by:
i have a tab control on my form. i then have several microsoft date and time picker control on the tab control. when i select a date on any of the date and time picker control, the result of the...
0
by: gnewsgroup | last post by:
I am not sure if anyone of you have had such experience. I am trying to use a popup calendar control in my web application. I've tried all kinds of 3rd-party date pickers. For example, the RJS...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.