jquery-ui

jQuery datepicker UI getdate() - How do I just output date only and NOT Wed Oct 06 2010 17:00:00 GMT-0700 (Pacific Daylight Time)

Hello all, Currently this code is working but not as expected: $("#start_date").datepicker({ dateFormat: 'yy-mm-dd', onSelect: function(_date, _datepicker) { var myDate = new Date(_date); myDate.setDate(myDate.getDate()+8); $('#estimated_hatching_date').text(myDate); ...

$.ui.position undefined in IFrame

I'm using the jQuery autocomplete widget. I have it implemented in a plain page. It works beautifully. I embed the autocomplete control in a modal window and I'm getting an error: $.ui.position is undefined $.each( [ "left", "top" ], function( i, dir ) { if ( $.ui.position[ collision[i] ] ) { $.ui.position[ col...

jQuery UI datepicker reinstantiation blues

I am having some trouble with jQuery UI's datepicker script and am hoping someone here may be able to help. I need to be able to dynamically create the elements that require the datepicker plugin, then destroy them, then re-create them. (I make heavy use of jTemplates for this.) Unfortunately, datepicker only appears to work the first...

Draggable element gets disable after one movement

$(this.dom.full).draggable({ containment: '#gib1', disabled: false, stop: function(event2, ui) { cancelFollow = true; return false; } }); I have made my div draggable but, it gets disable after one movement. Please help. Regrads rahul ...

How do I remove a selected date from a jQuery UI Datepicker?

Hi, After selecting a date on a jQuery UI Datepicker, how can this selection be programmatically removed? I'd like to remove/change the selected date, not the current date! Many thanks! ...

How do I get the jQuery-UI version?

This should be an easy question, but how do I detect the jQuery-UI version? This is for a Greasemonkey script and the (current) target page appears to be running jQuery-UI, 1.5.2. But, different target pages may run different versions. console.log ($.ui); did not show anything useful/obvious for version detection. ...

jQuery ajax call in Rails?

Hi guys, I want to execute a simple thing. When the user clicks the link jQuery needs to generate an Ajax request which sends the id of the link item to a method in the controller. Basically I want a nice looking modal dialog window when the user clicks the delete link. That window needs to contain various info about the deleted items. ...

jQuery DatePicker inline highlight certain dates

My problem is that the calendar is rendering before the JSON response is sent to the browser. In other words when we get to the array search my array is empty. How would I fix this? UPDATED: I gave up on trying to request more dates on month change, so now I just get about 6 months worth of events on my first call and display it all at ...

line numbers using jquery

<div id="line_numbers"></div> <textarea cols="65" rows="15" name="comments" id="comments"></textarea> <textarea cols="65" rows="15" name="matches" id ="matches"></textarea> there are many examples out there( http://stackoverflow.com/questions/1995370/html-adding-line-numbers-to-textarea ) but i just want to implement line number...

jQuery.ui.draggable's container jump-scrolls at drag start, loses window context

Seeing some bizarre behavior in a list of scrollable items. The containment is set to the <ul /> element (which is droppable), and the draggable items are the <li /> members. The container is relative-positioned, and is a couple of divs down inside an absolute-positioned container (something like top: 150, left: 250). When a drag star...

ASP.NET MVC - time ajax request

Hi, I'm using a jQuery modal dialog to display a 'Please Wait' type message to a user when a ajax call is made back to the server. I'm doing this by making the dialog visible using the jQuery ajaxSend method. And I close the dialog using the jQuery ajaxComplete method. All fairly routine stuff I'm sure. However if the call takes a ve...

Parsing dates from jQuery UI datepicker

Hi, I am using jQuery UI datepicker to allow the user to select dates. This updates an input field in a form in the format: dd/mm/yyyy I am trying to use jQueryUI to then parse the date in a UNIX timestamp to check it is a date with the built in jQuery UI parseDate: http://docs.jquery.com/UI/Datepicker/parseDate However i am not su...

Is is possible to determine when an element has been rendered using JavaScript?

Is there a jQuery equivalent to do the following: $(document).ready(function() { for an element: $(a).ready(function() { I have content in an updatepanel and I am calling jQuery UI's .button() on some anchor elements. After the updatepanel refreshed, the anchors are rerendered and lose the UI styling. I already know how to detect ...

JQuery Datepicker - no default date

Hi. I want to remove the default date in my JQuery Datepicker. I try the following code: $(this).datepicker({defaultDate: ''}); But it doesn't seem to work. Today's date is still selected as default. ...

jQuery Datepicker Format Date on Manual Input

I have a jQuery datepicker with format: dd-MM-yyyy. By default the datepicker converts dates such as 1-2-3 and 1-2-99 to 01-02-2003 and 01-02-1999 respectively. However, this is only the case when you press enter or choose the date from the datepicker. I tried to auto format the field when leaving the field by using: $j('.datepicker')....

jQuery Sortable - Keep it in original list

Does anyone know if jQuery UI's Sortable has built-in functionality to keep the original dropped item in it's original list? For example, you have two lists (one 'source' and one 'group'). I'd like to select from the source and drop into the group, but keep the item in the source. Make sense? Thank you! ...

jQuery UI Sortable: How to disable a connectSortable, but still be able to drag an item away from it

I have a situation whereby I have a series of connected sortable lists, and a list can have no more than 2 items at any one time. Therefore I need to somehow disable the "full" list, but still allow an item to be dragged away from it. // If this list has two items, disable it, otherwise enable it if ($('li', this).size()==2) { $(th...

jQuery AutoSuggest Plugin

Can somebody post a simple html code on how to implement it,with simple data object. Here is the link http://code.drewwilson.com/entry/autosuggest-jquery-plugin I have tried everything to get it working and i have not succeeded so far, can somebody please help Thanks Mason ...

Apply jQuery UI CSS Across Entire Site

I was wondering - is it possible to apply the jQuery UI CSS to an entire site without having to apply it individually upon elements? So, for example, instead of having to do: <input type="button" value="Submit" class="ui-state-default ui-corner-all" /> to all my buttons, I instead have some sort of class applied at at top-level DIV w...

jquery start dragging object when clicked on the other

Hi all, here's the deal: I'm trying to make a colorpicker act much like in Photoshop, so I have a background image of a color picker (rainbow-like image 200x200 px) and a circle trigger inside of it. So, if i attach a draggable UI to a circle: $('#rainbow-color-picker .circle').draggable({containment: 'parent'}); Works great. But he...