This blog post is
15 years old! Most likely, its content is outdated.
Especially if it's technical.
Inspired and copied from http://simon.incutio.com/code/js/date-parser/ and http://javascript.internet.com/calendars/fuushikaden-pop-up-calendar.html
This I think is a very neat way of inputting dates on a web form. The server side code must thus be able to parse both 13 december 2003
and 13/12/2003
but that shouldn't be too hard with the DateTime
module.
Look at the demo
If you have a browser with which this doesn't work let me know by posting a comment here.
UPDATE this demo had a little bug in the output that I have now fixed.
- Previous:
- My breakfast
17 October 2003
- Next:
- Systembolaget under pressure
21 October 2003
- Related by Keyword:
- Django forms and making datetime inputs localized
04 December 2015
- rfc822() vs. rfc1123_date()
16 August 2007
- Date formatting in Python or in PostgreSQL (part II)
19 April 2006
- Date formatting in python or in PostgreSQL
20 July 2004
- Related by Text:
- Be very careful with your add_header in Nginx! You might make your site insecure
11 February 2018
- jQuery and Highslide JS
08 January 2008
- I'm back! Peterbe.com has been renewed
05 June 2005
- Anti-McCain propaganda videos
12 August 2008
- I'm Prolog
01 May 2007
what about i18n? I'm from germany and need to fill in something like '13 März 2004'.
Is this possible?
Greets, Sönke
For the popup calendar I guess that's the same too.
I.e. search for "Mars" and replace it with "März".
but it's not using document.documentElement or document.body (as mentioned in that article). It works without a DOCTYPE (as in your demo) or with a DOCTYPE for HTML 3.2, but it sets the position of the calendar wrong with any more modern DOCTYPE string in IE, Safari, and Firefox.
Since I'm not a JavaScript dude, I've not attempted to fix things so far.
Hey, and what's up? You're not on #zope any more?
http://www.thalys.com/js/calendar.js?lg=en&country=fr
(Which works fine even with newer browsers using proper DOM.) Calling the popup seems to have a different method signature, and I haven't figured out too much yet, but something like onclick="popUpCalendar(this, this, 'dd-mm-yy','17-04-2001','01-01-2038') seems to work.