Javascript: Usable Date Field

This is a nice javascript that makes the date field (any date field) usable. All you need to do is to click inside the form field, and the calendar will pop-up for you to select the date. If you have any forms (e.g online booking, delivery service etc) be sure to use this kind of javascript.

It’s compatible with all major browsers:

  • IE6, IE7
  • Firefox 1.5, Firefox 2.0
  • Safari

Download available at the site. http://calendar.swazz.org



5 Comments on "Javascript: Usable Date Field"

  1. Vido says:

    Ades,

    thanks for sharing this script. I had been looking for a date field in the past, but found nothing that really suited my needs. I wanted something that looked similar to what expedia has got on its pages. You found what I was looking for!

    Thanks.

  2. kuanhoong says:

    Hi Ades,
    Thanks for the info.
    And would like to wish you “Happy Father’s Day”

  3. andrei says:

    heey, great script. one small problem though. in Internet Explorer, i have a form and i added your calendar in a field. when it pops up, it does this under any select field that i have under it. so it kinda like pops up in the backround of the fields. any other fields stay back, but Select field stay always on top.. any idea why ? can you fix this? thanks.. i would do it myself but i am a newbie in JS :P

  4. kris says:

    For Andrei.

    I have the same problem on old versions of IE but with any pop up script, not only this one.

    I solved using a trick (not nice, but the only solution I found).
    When need to show a popup, I hide the select and textarea fields below.

    the script:
    function hideSelect(aSelect)
    {
    var ie=document.all
    if (ie)
    {
    aSelect.style.visibility = “hidden”;
    }
    }

    function showSelect(aSelect)
    {
    var ie=document.all
    if (ie)
    {
    aSelect.style.visibility = “visible”;
    }
    }

    the html:
    onmouseover=”hideSelect(document.getElementById(‘field to hide’));”

    onmouseout=”showSelect(document.getElementById(‘field to hide’));”

    Hope this helps.

Got something to say? Go for it!