Jquery conflict suppressing date picker

User 2629835 Photo


Registered User
18 posts

Hello,

I'm just about done with my form, and I love using WFB!

I've run into a problem, though. In my form I'm using a tool called phpgrid (from phpgrid.com) to display some data related to what's on my form.

Phpgrid uses jquery 1.9.0 while WFB uses 1.4 (I think).

How can I use phpgrid and get the datepicker to show up? I searched stackoverflow yesterday and saw references to noconflict(), but I couldn't figure out where to add that bit of code.

Here's the error I'm getting when I click on the datepicker field. I picked up this error using Developer tools.

Uncaught TypeError: Object #<Object> has no method 'validate' validation.js:1
event.returnValue is deprecated. Please use the standard event.preventDefault() instead.

Thanks.

User 187934 Photo


Senior Advisor
20,271 posts

I don't know for sure if that's a conflict but you can try this.
<script src="other_lib.js"></script>
<script src="jquery.js"></script>
<script>
$.noConflict();
jQuery( document ).ready(function( $ ) {
// Code that uses jQuery's $ can follow here.
});
// Code that uses other library's $ can follow here.
</script>

Another option is to rearrange the order of your scripts
I've had better luck with
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="common/js/form_init.js" data-name=""
id="form_init_script">
</script>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2629835 Photo


Registered User
18 posts

As always, thanks for your advice Eric!

After rereading my post, I should clarify...The datepicker works on the form when I don't use phpgrid. When I use phpgrid in my form, the datepicker doesn't show up. Images attached.

I tried your 2nd idea, but no luck.

As to your first suggestion, I'm afraid I don't understand where I would put that code, and, if I did know where to put it, I don't know what I would put in here
// Code that uses jQuery's $ can follow here or here
// Code that uses other library's $ can follow here.
Attachments:
User 2629835 Photo


Registered User
18 posts

As always, thanks for your advice Eric!

After rereading my post, I should clarify...The datepicker works on the form when I don't use phpgrid. When I use phpgrid in my form, the datepicker doesn't show up. Images attached.

I tried your 2nd idea, but no luck.

As to your first suggestion, I'm afraid I don't understand where I would put that code, and, if I did know where to put it, I don't know what I would put in here
// Code that uses jQuery's $ can follow here or here
// Code that uses other library's $ can follow here.
User 187934 Photo


Senior Advisor
20,271 posts

Can you share a link?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2629835 Photo


Registered User
18 posts

I wish. It's a corporate site behind a firewall.
User 187934 Photo


Senior Advisor
20,271 posts

You could also try adding your own JQuery ui datepicker library files.
http://jqueryui.com/datepicker/
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2629835 Photo


Registered User
18 posts

That's an awesome idea Eric. I'll give that a try and let you know how it works/or doesn't.

Thanks for all of your help!

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.