Email conversation
From | Craig Golby |
To | Me |
Subject | Date Picker - DIV Tags |
Date | 24 January 2005 23:54 |
I have been looking at your Date Picker and it looks to be exactly what I am
looking for, but I would need to make two amendments.
The first, and probably most difficult of the two, is to embed the Date
picker into DIV tags as opposed to being in a Pop Up, how difficult do you
reckon this would be, you dont by some stroke of genius already have a
version like this do you ???
My second amendment would be to modify the way a year is selected, I have a
need for someone to enter a Date of Birth into a form, with a year that
could realistically range from 1900 - 1990. To cycle through so many years
would be a nightmare, so maybe embedding your scroller ( :-}} ) or using a
drop down to select a year and force a refresh of the calendar would work,
any thoughts ??
Many thanks for a great site, I have seen a few things that I will be able
to make use of in my new venture, and will happily include a link to you
when my corporate site is up and running. I will let you know when it is
available.
Regards
Craig A Golby
From | Me |
To | Craig Golby |
Subject | Re: Date Picker - DIV Tags |
Date | 18 January 2005 12:54 |
Craig,
> The first, and probably most difficult of the two, is to embed the Date
> picker into DIV tags as opposed to being in a Pop Up
There are significant problems associated with this, which is why I do not
do it. Firstly, a div tag cannot be rewritten in Opera 6 (not a major
problem since on desktops, this has been almost entirely replaced by Opera 7
[and the upcoming 8.x], but this browser is one of the most popular real-web
browsers on handheld devices, and is still in common use on Mac OS 9-), and
secondly, several browsers have problems when DIVs are positioned over the
top of form inputs.
Since in general, a calendar/date picker will be used to aid filling in a
form, this presents a real problem, as the calendar will not work wherever
it appears over the top of an input field. The problem here is that the
underlying form inputs will show through the DIV, and will appear to be on
top of it, meaning that you cannot click on the calendar. In Opera,
Konqueror and ICEbrowser (and Netscape 4 - if anyone cares), this will
affect all inputs. In IE on windows, this will affect SELECT inputs. In IE,
Safari, OmniWeb, Mozilla/Firefox (with native skinning), and in fact any
other browser on Mac, this will affect all inputs, but especially SELECT or
button/submit/reset inputs.
As a result, I do not have any version that will work using a DIV tag. Using
a popup window is much more reliable, as none of these input problems will
affect it, and as an extra bonus, it will also work in Opera 6 and iCab.
Reprogramming it would be possible, but at the moment, it is based entirely
around using a popup, so a substantial amount of it would need to be
rewritten.
If you feel you must use a DIV, then you might want to try:
http://www.dynamicdrive.com/dynamicindex7/jasoncalendar.htm
Note, however, that that calendar will still suffer from the input problems,
and it will also not work in older browsers. However, it does offer the
ability to quickly set the date first, using select inputs, which answers
your second point (you could also do this with my calendar script using
select inputs to activate the curDate.setWhatever methods). For your
purposes, assuming you still want to use a DIV, this calendar is probably
what you should use.
[Ed. I will not normally recommend scripts on the DynamicDrive site, as they
often fail to work in all the major current browsers, fail to work correctly
if browsers spoof their identity, produce errors in browsers they are not
intended for, and rely on very poor sniffing techniques (Yuck!) - however,
occasionally I do find a few scripts that I like on there]
Probably not the answer you were expecting, but at least I am honest :)
Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/