Some of the information here may be outdated, please check the book instead
[edit]

web2py ships with jquery core and some additional goodies.

Version 1.38 and beyond

Ships with

in the static folder of your application, all INPUT fields of class "date", in particular all those automatically generated by SQLFORM for database fields of type "date", will display a popup ajax datepicker., all INPUT of class datetime will display a datetimepicker.

Before version 1.38:

One of these is the built-in configuration for jquery datepicker but it does ship with datepicker.

That means that if you just copy these two files

in the static folder of your application, all INPUT fields of class "date", in particular all those automatically generated by SQLFORM for database fields of type "date", will display a popup ajax datepicker.

As long as you use the defaul layout.html or a custom layout that {{include "web2py_ajax.html"}} in <head>..</head>, there is no need to configure anything. If the two files are in static, web2py will find them and use them.

You can try the datepicker here:

http://mdp.cti.depaul.edu/demo_app/appadmin/insert/db/event

© 2008-2010 by Massimo Di Pierro - All rights reserved - Powered by web2py - design derived from a theme by the earlybird
The content of this book is released under the Artistic License 2.0 - Modified content cannot be reproduced.