Continued below...
On 2016-04-05 12:31, [email protected] wrote:
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.
* is a non-minified widgets.js available?
* timepicker: the {h} time format (hour in 12-hour time, without zero
padding, like strftime's %i) is interpreted correctly for display, but
the .cal_wrapper table is empty (no data at all)
* datepicker: puts a time of 12:00:00 placed in the input value,
preventing web2py from accepting the form. I have a JQuery .submit
snipping the time bit out for now
* timepicker: web2py requires 24 hour time representation. If I have a
default time
of "19:00", it gets displayed correctly in the form as "07:00PM", but on
submission the time in the record is AM. I'm using the same .submit to
clean this up too.
Thanks for writing these, hope the feedback is helpful.
-mg
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.