Finally, .. i got this to work in a semi satisfactory manner  .. thank you 
Again Anthony  !

For the ones who may have had or will have the same issue  with the  
select_datewidget ! ...
The idea here is
1)  put the widget " def select_datewidget(field,value): .... " at the end 
of a model file ( in this case it was db.py )
2) Then, the trick here is, put the following line at the end of the same 
file right after step (1) : db.yourtable.your_date_field.widget = 
select_datewidget
3) wheter you use SQLFORM.factory or not in the controller, the 
select_datewidget will be by default ! instead of the datepicker popup 
calendar ! but you may have to use it ( or SQLFORM ) to customise
the form you want ...

BECAUSE :
in the view, with the help of css, you will need to customise the width of 
the HTML select tag otherwise, it will use the size defined by the css 
included in the app.
like the following :
{{=form.custom.begin}}
  .
  .
  <html_tag  (class_or_id) =" defined_width ">   
{{=form.custom.widget.datefield}}   </html_tag>
  .
  .

{{=form.custom.end}}

The main problem with this approach  is .. all the select fields for the 
date to be chosen will be the same width  ... I have not found a way to 
make them with different width .. that was very frustrating ...
 I cannot play with the different 3 date fields in the view ( year, month, 
day ) embedded in the datefield of the table !
 ... unless someone else come up with a way to do it !! ....

Else where ... I had to look into the select_datewidget solution simply 
because, if someone uses another grid system in web2py, the datepicker 
popup breaks ! ... it will popup but does not show up properly .... this 
may be a bug ! .. All the Thead items of the popup table show up on the 
left side even when there is no float left anywhere in the css used !


-- 



Reply via email to