this is a common issue even with "tabbed" content, if you don't know how to
hook up events. That's why on the default web2py.js there's a method to
reinitialize all hooks between inputs and the default calendar widget...
you just need to hook up in the correct way your ones.
The issue (again, happens the same with a "tabbed" interface) is because
jquery can't really attach correctly events to inputs that are hidden at
the time your js code applies the "hook" between the focus event on the
input and the "please make a calendar to pop up": it happens a lot with
modals if you don't know how to use it right away, because usually you
create a modal that remains hidden until you press some button to show it
up.
Same thing goes for LOADed content: web2py.js reinitialiaze all hooks after
loading a fragment because the new fragment may have inputs in it that are
not hooked by the js code running in the "containing" page.
PS: you'll struggle a little bit with those kind of errors but are
unrelated to web2py and more related to html+js coding in general and you
should fix it right now with your own js code (maybe even tweaking the
default web2py.js) only if you know what you're doing.
Please note that with the new "modular" web2py.js (from >= 2.6.0 ) there
will be easier ways to fix those issues in your own js files.
On Thursday, July 18, 2013 10:55:01 PM UTC+2, Dmitri Husti wrote:
>
> Hi,
> I had the same problem.
> I've used this workaround.
> _onclick="jQuery(this).datepicker();jQuery(this).datepicker('show');"
>
> Am Donnerstag, 18. Juli 2013 17:43:50 UTC+2 schrieb Remco K:
>>
>> Hi all,
>>
>> I have a SQLFORM inserted into a modal (requested as a LOAD file), which
>> includes a datetimepicker from Jquery. This is working well until i submit
>> my form and get a result back from my form validator. After clicking on the
>> datetime field again i don't see the datetimepicker anymore.
>>
>> I've already struggled with Jquery on(), but this doesn't seem to be the
>> answer. I'm a bit afraid that the web2py_ajax_page function is causing this
>> problem.
>>
>> Is there a way to get this to work? I think that the web2py solution of
>> its own datetimepicker work, but i want to use the Jquery plugin (or just
>> another jquery plugin in the future).
>>
>> I'm afraid that i can't be more specific about this problem, because i
>> can't debug a lot since i'm working from a modal. I just hope that someone
>> else here already dealt with this problem...
>>
>> Thanks in advance!
>> Remco
>>
>
--
---
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/groups/opt_out.