views:

29

answers:

1

I would like a label instead of a textbox, is that possible. The code is below:

$(document).ready(function(){
   $("#mydate").datepicker({ maxDate: '+1y', minDate: new Date() });
});

<li class="quick_date"><%= text_field_tag "mydate", Date.now.strftime('%m/%d/%Y'), :size => 10 %> <a id="quick_search" href="#">(Change Me)</a></li>
+2  A: 

Instead of a label, keep the textbox, remove the border, and set the background of the textbox to be the same as your background

it will look just like a label...and you won't have to setup a hack to fire the datepicker.

Style:

input, select, textarea
{
    border: 0px;
    background: #FFFFFF;
    font-size:12px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    padding:2px;
}
Ed B
+1 - your ninja profile icon is well deserved.
HurnsMobile