datepicker not working with autocomplete symfony - symfony1

I am working with a form in symfony in which I need to use both the autocomplete and the datepicker functionalities. For autocomplete I am using sfExtraWidgetFormInputAutocomplete and for datepicker I am using sfWidgetFormDateJQueryUI in my form configure() method. In my form first widget using autocomplete is rendered and then the datepicker widget. I have read that there is some compatibility issue with these two.
Please tell me how to make them both work in single form.

use this line on the top of the page:
jq_add_plugins_by_name(array('autocomplete'));

Related

MVC.Grid Filter - Date Window/Calendar

I'm using MVC.Grid to populate a table & everything is working nicely. However for the date column I would like to click on the filter icon & have a date window to select form instead of the standard equals/contains option. Anyone done this?
FYI - I'm also using bootstrap 3.1 & MVC 5.2.
screenshot of current column filter:
Have a look at this post. You need to add a library for datepicker and add the proper css to the code.
Date Picker

How do I remove the tooltip in Grails 2.0.4?

Does anybody know how to remove the tooltip in Grails 2.0.4? Currently all my mandatory fields shows a tooltip. I am trying to create a UI without the tooltip. I am using jQuery and jQueryUI.
Is there anyway that I could remove the tooltip? I think the tooltip is set by default in Grails 2.0.4.
Thanks.
you could use jQuery to remove the title attribute like so...
$(document).ready(function() {
$('[title]').removeAttr('title');
});
I think this is html 5 related. Do the fields have "required" in the tags (which I know grails puts in by default when performing scaffolding)? If so, the browser will check that those fields are filled in and prompt the user if they are not before submission. This was driving me bonkers trying to figure out what was going on.

Applying jQuery Mobile attributes to XPages controls

I have just started looking into using jQuery Mobile on a XPages project. I am unsure whether I should use XPages controls or standard HTML controls in certain circumstances.
For example, I need a simple "Save" button on a page. An xp:button does get rendered with the jQuery Mobile style. But how would I then apply attributes to it, such "data-icon" and "data-inline"?
Or should I be using a standard HTML tag in this case? If so, I lose the ability to code XPages simple actions to, say, save the data sources.
Thanks for any tips.
If you are using 8.5.3 you can use the attr property of the button to add the data-icon and data-inline tags.
<xp:button value="Label" id="button1">
<xp:this.attrs>
<xp:attr name="data-icon" value="marky"></xp:attr>
</xp:this.attrs>
</xp:button>
If not then you can use jQuery to add the attribute using $().attr('data-icon', 'whatever'). Remember though the clientID of the button will change through the interface and you will need to adjust for that. You could you my x$ function
http://openntf.org/XSnippets.nsf/snippet.xsp?id=x-jquery-selector-for-xpages

knockout js: The "with" binding breaks the jquery ui

http://jsfiddle.net/AYPze/9/
In this example I have two similar divs with the same goal. Bind the selected date from the datetimepicker and save it to the object binded by knockout js.
The problem with the first div is that the datetimepicker won't show up because i use the knockout "with" binding.
The second div uses the normal knockout js binding syntax, which works fine with the datetimepicker.
I experienced this behavior also with the jquery-ui Accordion
My Questions:
Is this a bug in knockout or jquery-ui?
Is there a work around, so I can use the "with" binding?
Your problem is related to the with binding, but not in the way you think.
The problem you have is that the with binding in this case will remove the jQuery datepicker from the DOM element and that is why you don't see the datepicker for the first textbox.
The main problem here is that you are breaking a very important rule when working with Knockout and the DOM. You shouldn't access the DOM directly with jQuery like you are doing now. You have to use a bindingHandler to bridge the gap between your data model and the DOM model.
The Binding Handlers seem complex at first, but they are pretty handy once you get to know them.
Here is an updated version of your fiddle with a working datepicker: http://jsfiddle.net/AYPze/10/

My dropdown is not showing the data

I am having a html dropdown
<select id="ExternalIp" onchange="externalIpchange()"></select>
I bind the data to dropdown through jquery and a I am passing data from controller which is working properly. I want to change the look and feel of the dropdown so I called a function
$("#ExternalIp").selectbox();
Now the look and feel of drop down is changed but it is not showing the data which I bind to dropdown. I am not getting what is the problem. Plz help
It appears as if the jQuery plugin you are using resets the values bound to the select list.
Look for a method provided within your jQuery plugin to rebind the data which you earlier attached with jQuery or style your element first and then try binding the values.
Cheers!!!

Resources