> > 1) Even on a standalone test ... with no previous field define in a table > ... the widget as shown in the web2py dev cookbook does not work the way > they have said that it would work ... they might want to update it or to > revise it ... ! .. well .. more precisely ... it does not show up as > stipulated in the corresponding view file ! .. we get as a result 3 input > fields that takes the default width plus an additional input field where > the final chosen date is shown ! ( so we get 4 rows in total stacked on > top of the other ) .. ( I do understand there might be conflicts with the > various uploaded css / js files ) >
I don't have time to fully debug, but looking at the Javascript ( https://github.com/mdipierro/web2py-recipes-source/blob/master/source/05_adding_ajax_effects/04_Creating_a_dropdown_date_selector/db.py#L96), it appears you might need to wrap it all in a Jquery document ready handler: jQuery(function() { [existing JS code goes here] }) The JS code is supposed to hide the text input field, parse any existing date in the field and transfer those values to the dropdowns, and then whenever a new value is selected in a dropdown, it grabs the value and updates the date in the hidden text field. When you submit, it is the value in the hidden text field that gets submitted -- the dropdowns are used only on the client side. Hopefully the above change will get the JS working (including hiding the text field). As for how the select dropdowns are displayed, you may have to play with the HTML/CSS to get that to look the way you want. It looks like they should display inline, but if the container is too narrow, they will wrap to additional lines. > 2) Please help me with this : - If I know how I can specify or isolate the > different portion of the date in the corresponding table field of the db > ... ( mainly in the view for serialisation ) without modifying the > original table in models .. i should be able to make it work for me ? > example : db.table.datefield->day ( for the day ) and > db.table.datefield->month ( for the month ) and db.table.datefield->year > ( for the year ) > I'm not quite sure what this means. Anthony --

