Working on integrating the new date and time pickers with my code,
thoughts:
* I added sugar.js and widgets.js and removed all of the existing JS.
The calendar locked up those plus the existing JS: I wasn't using
(AFAIK) any of the existing JS, and it wasn't clear what parts were in
what files, so I stopped including them.
* The background color for the picker is set in the element, overriding
my CSS -- I have to use !important, which seems less than ideal.
* My form (created by SQLFORM) has separate date and time fields, with
.date and .time classes by web2py (no data-format): I get a full
datetime picker for both.
* The time picker uses 12 hour time with no AM/PM by default
* I'm getting an error from inside widgets.min.js: self.attr(...) is
undefined on line 28
* getting 'data-format' in my SQLFORM fields was harder than it should
have been. I ended up needing:
db.cal_event.starttime.widget = lambda field, value:
SQLFORM.widgets.time.widget(
field, value, **{'_data-format': "{HH}:{MM} {TT}"})
* is there a way to get the date picker to go away when I click on a
day?
I have to click out of the calendar and not in another input item to
make it hide? I love that TAB still takes me to the next field, but it
would be great if I could use arrow keys to navigate -- I still have to
switch from keyboard/mouse to move through the form.
>> an email to
web2py+un...@googlegroups.com.