Forums

field width for datepicker ...

iaweb2 16 Feb, 2011
I searched back and forth and it seems I am the only one who has this problem...

I am using a datepicker field and would like to change the width of the field. I used the Wizard and set the size to 11 and save it and the field still comes out with the field size of 20 ... (see attached picture ...) [attachment=0]fieldsize.png[/attachment]

I used now the simplest code there can be:

<div class="form_item">
  <div class="form_element cf_datetimepicker">
    <label class="cf_label" style="display: none;">Click Me to Edit</label>
    <input class="cf_datetime" title="" size="10" id="date_0" name="date_0" type="text" />
    
  </div>
  <div class="cfclear"> </div>
</div>



And even here the size switches back to 20 once the form is loaded...

Am I really that stupid or is there something I forgot??

Thanks


Heiko
GreyHead 16 Feb, 2011
Hi iaweb2,

The CSS over-rides the value of the size attribute. Try something like
<input style='width:150px;' class="cf_datetime" title="" size="10" id="date_0" name="date_0" type="text" />

Bob
iaweb2 16 Feb, 2011
Hey Bob:

Thanks for the answer, unfortunately that changes nothing either ... Still looks exactly the same and does not change the filed size...

Thanks


Heiko
GreyHead 16 Feb, 2011
Hi Heiko,

Please post a link to the form so we can take a quick look.

Bob
GreyHead 16 Feb, 2011
Hi Heiko,

Looks as though it's working OK, maybe you need to set 150px to something different.

Here it is at 10px which is a bit small.

Bob
iaweb2 16 Feb, 2011
Hello Bob:

Yeah, I am a moron, I admit it, I used your 150px without thinking or changing it to a smaller number which actually would be different than the 20 letters size...

Thanks for the help...


Heiko
orionis 19 Apr, 2011
Hello,
I have exactly the same problem, but I don't know where to modifiy the input field's width?
Can someone help me, please?
Fabrice
GreyHead 19 Apr, 2011
Hi orionis,

Please see the second post in this thread. Does that answer your question?

Bob
orionis 19 Apr, 2011
Thanks for your fast answer!
I've try this :

<input name="start-date" id="start-date" class="date-pick" width="50px" />

But it didn't work, of course...😶
I've just try the solution you propose (width the tag "size" instead), and it's ok! 😀
But I still don't know how and where the original input width field is set?!?
GreyHead 19 Apr, 2011
Hi orionis ,

I actully propopsed adding the style='width:150px;' which is possibly better HTML.

The original width is set in the element setup in ChronoForms I think.

Bob
This topic is locked and no more replies can be posted.