Selectable dates in a drop down menu format

Results 1 to 5 of 5

Thread: Selectable dates in a drop down menu format

  1. #1
    NAOMI Guest

    Default Selectable dates in a drop down menu format

    I would like to implement 3 drop date menus. <BR>The 1st menu displays all the days till the present day, the second menu displays all the months to the present month, and the third menu displays all the years from 1990 to the present year. If the year is changed to 2000 then all the months and dates are changed correspondingly i.e because 2000 is a past year all the months and their corresponding days should be available for selection. If the year is changed to 2001 the current month available for selection is January and the days from January the 1st to the present day are displayed. In the month of Febuary the 25th day the months available for selection would be January and Febuary all days in January will be available for selection but if febuary is selected as the month all the days from 1st - 25th of Febuary will be selectable as days. <BR>So if any one has a script please point me in the right direction <BR>Gracias

  2. #2
    Steve Cimino Guest

    Default Ummmm?

    Perhaps you should give us an example... I&#039;m totally confused after reading that post.

  3. #3
    NAOMI Guest

    Default RE: Ummmm? URGENT reply needed

    Okay you have 3 drop down menus <BR><BR>Day Month Year<BR>1 Jan 2000<BR>2 <BR>3<BR>.<BR>.<BR>31 <BR>All the days in January of 2000 can be selected because its in the past you select the year 2001 and the month of January then the days available for selection will be between 1-25 as below<BR>Day Month Year<BR>1 Jan 2001<BR>2<BR>3<BR>.<BR>.<BR><BR>25<BR><BR><BR>in the future say Feb all the days of January in the year 2001 will now be available because we are now in Feb <BR>Deep huh? ...<BR>So thats the problem any solutions

  4. #4
    Steve Cimino Guest

    Default Ick

    Wow, did you get tasked with meaningless coding... <BR><BR>K, the key to this is to read into a JS array. Depending on the selection, you call the JS function to populate the dropdown properly (your key will be the year/month).<BR><BR>So: (pseudocode)<BR><BR>function makeBoxes(){<BR> var today = new Date(); //used to compare what year we&#039;re in<BR> //now, make an array of arrays used for months and days<BR> //next, make an array that only contains the current days we can see<BR>//when the user selects a year, we&#039;ll compare that first; if it&#039;s<BR>//in the past, we&#039;ll give them all the dates<BR>//if it&#039;s this year, we&#039;ll have to compare the months to today<BR>//if it&#039;s in the future, we won&#039;t do anything (I think that&#039;s what you wanted)<BR>//depending on our check, we&#039;ll repopulate the select box<BR>}<BR><BR><BR>I know this may be deep if you&#039;re not a JS coder... I can help you with it if you need to, but it may take me awhile to get to it.

  5. #5
    NAOMI Guest

    Default RE: Ick

    any help is greatly appreciated please reply to<BR>with any snippets, info, links, pointers...<BR>thankyou<BR>naomi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts