Hi everyone!
First of all, my greetings for this incredible toolkit, I just can imagine the hard work it has required...
Going straight to the point, I would like to change (exactly, to decrease) the size of a DateTextBox and a TimeTextBox (in other words, I need to set the width of the field to a shorter value).
On the Dojo book, I noticed the size attribute. I tried to set the size this way:
var startDate = new dijit.form.DateTextBox({ id: 'startDate',
constraints: {datePattern:'dd/MM/yyyy'},
required: 'true' },dojo.byId('startDatePickerDiv')
);
startDate.size = '10px'; // also trying percentual measures... like 10%
But it did not work at all.
I've tried to invoke a startDate.render() after the size update, but I did not work (it cannot found the render(), but it was just a try).
I've tried to invoke startDate.buildRendering(), but it did not work out (notthing happened, but it was just another try).
Please note that all this code it is part of the postCreate() method of the widget container.
What has made me think about is this:
1) on Dojo book I can read, on the note for size attribute for TextBox widgets: ' HTML INPUT tag size declaration. Updated in 1.0: size is simply copied to the widget. It's not used by TextBox.'
2) all the DateTextBox and TimeTextBox in the Dojo documentation pages have the same size (or width), as the ones into my widget, as if it is impossible to change this parameter.
Any suggestion?
Thank you all,
Leonardo

I am having same problem -
I am having same problem - anyone knows solution to this?
thnx.
br
to answer my own question.
to answer my own question. "size" doesnt work , style="width: 50px;" does.
br
better solution needed for sizing widgets
Thanks for the information. The style works !
But isn't this an important feature that the dojo community has to address in all of its widget development ? Or am I missing some design decision ?