dateSelectTags

9 views
Skip to first unread message

Randy Johnson

unread,
Nov 26, 2009, 6:43:33 PM11/26/09
to ColdFusion on Wheels
Hello,


Is there a way to set the default value in the dateSelectTags  to something other than the date or blank  like  Month: Day: Year:?  I saw that in the select() syntax you can pass in a string, but the dateSelectTags  doesn't seem to have that functionality for each select box.

Thanks!

Randy


raulriera

unread,
Nov 26, 2009, 7:04:38 PM11/26/09
to ColdFusion on Wheels
Randy,

I don't quite follow you, do you mean change the order of the
month,day or year? (you can, and also you can skip the month, or the
day or the year)...

With the "order" argument you can pass (and skip) the ones you want to
display and their order

Randy Johnson

unread,
Nov 26, 2009, 8:16:07 PM11/26/09
to cfwh...@googlegroups.com
I was wanting to change each of the default values to something other than blank in the dateSelectTags Function.  Here is the end result of what I want to accomplish:

<p>
     <label>Birthday</label>
     <select id="user-birthdate-month" name="user[birthdate]($month)">
          <option value="">Month:</option>
          <option value="1">Jan</option>
          <option value="2">Feb</option>
          <option value="3">Mar</option>
          <option value="4">Apr</option>
          <option value="5">May</option>
          <option value="6">Jun</option>
          <option value="7">Jul</option>
          <option value="8">Aug</option>
          <option value="9">Sep</option>
          <option value="10">Oct</option>
          <option selected="selected" value="11">Nov</option>
          <option value="12">Dec</option>
     </select>
     <select id="user-birthdate-day" name="user[birthdate]($day)">
          <option value="">Day:</option>
          <option value="1">1</option>
          <option value="2">2</option>
          <option value="3">3</option>
          <option value="4">4</option>
          <option value="5">5</option>
          <option value="6">6</option>
          <option value="7">7</option>
          <option value="8">8</option>
          <option value="9">9</option>
          <option value="10">10</option>
          <option value="11">11</option>
          <option value="12">12</option>
          <option value="13">13</option>
          <option value="14">14</option>
          <option value="15">15</option>
          <option value="16">16</option>
          <option value="17">17</option>
          <option value="18">18</option>
          <option value="19">19</option>
          <option value="20">20</option>
          <option value="21">21</option>
          <option value="22">22</option>
          <option value="23">23</option>
          <option value="24">24</option>
          <option value="25">25</option>
          <option selected="selected" value="26">26</option>
          <option value="27">27</option>
          <option value="28">28</option>
          <option value="29">29</option>
          <option value="30">30</option>
          <option value="31">31</option>
     </select>
     <select id="user-birthdate-year" name="user[birthdate]($year)">
          <option value="">Year:</option>
          <option value="2000">2000</option>
          <option value="2001">2001</option>
          <option value="2002">2002</option>
          <option value="2003">2003</option>
          <option value="2004">2004</option>
          <option value="2005">2005</option>
          <option value="2006">2006</option>
          <option value="2007">2007</option>
          <option value="2008">2008</option>
          <option selected="selected" value="2009">2009</option>
          <option value="2010">2010</option>
          <option value="2011">2011</option>
          <option value="2012">2012</option>
          <option value="2013">2013</option>
          <option value="2014">2014</option>
     </select>
</p>


-Randy

--

You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfwheels?hl=en.



tpet...@gmail.com

unread,
Nov 26, 2009, 9:53:54 PM11/26/09
to ColdFusion on Wheels
why couldn't you do:

dateSelectTags(selected="11/26/2009")
> On Thu, Nov 26, 2009 at 7:04 PM, raulriera <rierar...@gmail.com> wrote:
> > Randy,
>
> > I don't quite follow you, do you mean change the order of the
> > month,day or year? (you can, and also you can skip the month, or the
> > day or the year)...
>
> > With the "order" argument you can pass (and skip) the ones you want to
> > display and their order
>
> > On Nov 26, 7:43 pm, Randy Johnson <rjohnso...@gmail.com> wrote:
> > > Hello,
>
> > > Is there a way to set the default value in the dateSelectTags  to
> > something
> > > other than the date or blank  like  Month: Day: Year:?  I saw that in the
> > > select() syntax you can pass in a string, but the dateSelectTags  doesn't
> > > seem to have that functionality for each select box.
>
> > > Thanks!
>
> > > Randy
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "ColdFusion on Wheels" group.
> > To post to this group, send email to cfwh...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > cfwheels+u...@googlegroups.com<cfwheels%2Bunsu...@googlegroups.com>
> > .

Chris Peters

unread,
Nov 26, 2009, 10:06:20 PM11/26/09
to cfwh...@googlegroups.com
He wants for there to be the equivalent of select()'s includeBlank argument.

Randy, what happens if you do dateSelectTags(includeBlank="Month:,Day:,Year:")?

To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.

Randy Johnson

unread,
Nov 27, 2009, 5:13:57 AM11/27/09
to cfwh...@googlegroups.com
It put all three in each field.

Randy
Reply all
Reply to author
Forward
0 new messages