Professional Web Applications Themes

to check to date must be greater or equal from date - Macromedia ColdFusion

Hi All, I code my date selection like this : <select name="day" class="formData"> <cfloop index="d" from="1" to="31" step="+1"> <option value="#d#" <cfif d eq day(now())>selected</cfif>>#d#</option> </cfloop> </select> <select name="month" class="formData"> <cfloop index="i" from="1" to="12" step="1"> <option value="#i#" <cfif i eq month(now())>selected</cfif>>#uCase(monthAsString(i))#</option> </cfloop> </select> <select name="year" class="formData"> <cfloop index="j" from="#year(dateAdd("yyyy","-10",now()))#" to="#year(dateAdd("yyyy","10",now()))#" step="1"> <option value="#j#" <cfif j eq year(now())>selected</cfif>>#j#</option> </cfloop> </select> to <select name="day2" class="formData"> <cfloop index="d" from="1" to="31" step="+1"> <option value="#d#" <cfif d eq day(now())>selected</cfif>>#d#</option> </cfloop> </select> <select name="month2" class="formData"> <cfloop index="i" from="1" to="12" step="1"> <option value="#i#" <cfif i eq month(now())>selected</cfif>>#uCase(monthAsString(i))#</option> </cfloop> </select> <select name="year2" class="formData"> <cfloop index="j" from="#year(dateAdd("yyyy","-10",now()))#" to="#year(dateAdd("yyyy","10",now()))#" step="1"> <option ...

  1. #1

    Default to check to date must be greater or equal from date

    Hi All,

    I code my date selection like this :


    <select name="day" class="formData">
    <cfloop index="d" from="1" to="31" step="+1">
    <option value="#d#" <cfif d eq day(now())>selected</cfif>>#d#</option>
    </cfloop>
    </select>

    <select name="month" class="formData">
    <cfloop index="i" from="1" to="12" step="1">
    <option value="#i#" <cfif i eq
    month(now())>selected</cfif>>#uCase(monthAsString(i))#</option>
    </cfloop>
    </select>

    <select name="year" class="formData">
    <cfloop index="j" from="#year(dateAdd("yyyy","-10",now()))#"
    to="#year(dateAdd("yyyy","10",now()))#" step="1">
    <option value="#j#" <cfif j eq year(now())>selected</cfif>>#j#</option>
    </cfloop>
    </select>

    to

    <select name="day2" class="formData">
    <cfloop index="d" from="1" to="31" step="+1">
    <option value="#d#" <cfif d eq day(now())>selected</cfif>>#d#</option>
    </cfloop>
    </select>

    <select name="month2" class="formData">
    <cfloop index="i" from="1" to="12" step="1">
    <option value="#i#" <cfif i eq
    month(now())>selected</cfif>>#uCase(monthAsString(i))#</option>
    </cfloop>
    </select>

    <select name="year2" class="formData">
    <cfloop index="j" from="#year(dateAdd("yyyy","-10",now()))#"
    to="#year(dateAdd("yyyy","10",now()))#" step="1">
    <option value="#j#" <cfif j eq year(now())>selected</cfif>>#j#</option>
    </cfloop>
    </select>


    i want to include checking funtion to validate to date must be greater or
    equal from date,
    Do anyone got javascript for that or any code to check in that page while
    selection. what I mean before submit to another page for checking.

    Thanks in advance

    Shaffiq

    capik79 Guest

  2. #2

    Default Re: to check to date must be greater or equal from date

    any one got the solution???

    thanks in advance
    Shaffiq
    capik79 Guest

  3. #3

    Default Re: to check to date must be greater or equal from date

    There would be quite a number of people here with the answer, but this would
    require them/me to write the complete javascript function. Which I don't think
    anyone here has the time to do this.

    The following is a link to a javascript site, it has all you need to do this

    [url]http://www.irt.org/script/script.htm[/url]

    Ken

    The ScareCrow Guest

Similar Threads

  1. Greater than/Equal To Font Problem
    By Ken_vw@adobeforums.com in forum Adobe Indesign Macintosh
    Replies: 5
    Last Post: August 22nd, 07:30 PM
  2. query with greater than date
    By Explorer5 in forum Coldfusion Database Access
    Replies: 0
    Last Post: April 12th, 08:52 PM
  3. How do I check installation date of Sun OS?
    By Nitin in forum Linux / Unix Administration
    Replies: 4
    Last Post: December 30th, 01:15 PM
  4. Replies: 9
    Last Post: October 24th, 07:31 PM
  5. check the time and date
    By Boon Chong Ang in forum PERL Beginners
    Replies: 0
    Last Post: August 27th, 02:31 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139