Search and Top Navigation
#3945 closed bug (fixed)
Opened January 26, 2009 07:40AM UTC
Closed June 06, 2012 02:00PM UTC
Last modified August 22, 2013 08:01AM UTC
DatePicker does not respond to any click events in AIR, Google Sites, Windows Metro
Reported by: | canthonyza | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.8.22 |
Component: | ui.datepicker | Version: | 1.6rc5 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The DatePicker renders perfectly with Themeroller also disappears when out of focus, but seems like none of the click events are being fired. Can't move to next or previous month/year.
Please let me know if there is any other info I can give you.
Attachments (1)
Change History (23)
Changed January 27, 2009 03:12AM UTC by comment:1
milestone: | TBD → 1.next |
---|---|
priority: | minor → blocker |
Changed January 27, 2009 07:15PM UTC by comment:2
i got the exactly same problem. I attached my stripped 'index.html' of my AIR app.
Changed March 13, 2009 10:38AM UTC by comment:3
Any news about this bug yet? 1.next = 1.9 or 1.8?
Thanks! :)
Changed March 15, 2009 02:31PM UTC by comment:4
Same here... doesn't work in AIR yet. (Not as of 1.7) Will this be working in 1.7.1?
Changed April 10, 2009 01:12PM UTC by comment:5
Most likeley related to this security restriction of the AIR sandbox:
Supports dynamically loading strings as code after the load event: eval() function, setTimeout('string', milis), javascript: URLs, attribute handlers on elements such as onclick='myClick()') that are inserted via innnerHTML, and so on.
See http://help.adobe.com/en_US/AIR/1.5/air_html_security/WS5b3ccc516d4fbf351e63e3d11c0f598320-7ffc.html
Changed April 28, 2009 05:46AM UTC by comment:6
I thought 1.7 suppose to have full Air support?
Still not working in 1.7.1.
Changed January 09, 2010 06:30PM UTC by comment:7
Hi
For some strange reason Adobe AIR refuses to accept dynamically created onclick="" attributes. For example div.innerHTML='<a onclick="[javascript code]"> ' would not work.
You have to dynamically add the click's back in. You have two options.
Option 1: You can change the ui.datepicker.js file by putting:
AFTER THIS CODE (around line 620):
if (inst.input && inst.input[0].type != 'hidden' && inst == $.datepicker._curInst) $(inst.input[0]).focus();
PUT THIS CODE
id = "#"+$(inst).attr("id"); $(".ui-datepicker-next").click(function() { DP_jQuery.datepicker._adjustDate(id, +1, 'M'); }); $(".ui-datepicker-prev").click(function() { DP_jQuery.datepicker._adjustDate(id, -1, 'M'); }); drawMonth = inst.drawMonth; drawYear = inst.drawYear; $(".ui-datepicker-calendar").find("tr > td").each(function() { $(this).click(function() { DP_jQuery.datepicker._selectDay(id,drawMonth,drawYear, this); }); });
Option Two: Adjust the above code around the onChangeMonthYear event. I'll let you figure it out.
Changed March 23, 2010 09:08PM UTC by comment:8
Patch for jQuery UI 1.8: http://zetafleet.com/dev/jui/jquery.ui.datepicker.js.air-fix.patch
This patch is fully tested.
Changed March 24, 2010 07:07AM UTC by comment:9
Changed April 06, 2010 09:25PM UTC by comment:10
I am unable to verify this fix with latest rev 1.8 sources.
Built a bare-bones AIR app (using Aptana studio) with jquery-1.4.2.min.js and jquery-ui-1.8.min.js. Used the default demo code from JQuery website -
<script type="text/javascript"> $(function() { $("#datepicker").datepicker(); }); </script>
<p>Date: <input type="text" id="datepicker"></p>
The datepicker shows up on the input box but does not allow for selection of any date from the drop-down, the prev and next buttons do not work either. Tried listening to onSelect event for this datepicker and noticed that it never gets fired. Am i missing something?
Changed April 16, 2010 09:39PM UTC by comment:11
The patch was not merged back into the trunk for whatever reason, so yeah, if you use the official source you will still not be able to use datepicker.
Changed October 19, 2010 04:08PM UTC by comment:12
priority: | blocker → major |
---|
Changed April 05, 2012 08:48PM UTC by comment:13
The same underlying problem prevents datepicker from working on Google Sites' HTMLBox.
Changed April 05, 2012 08:49PM UTC by comment:14
This commit enables all of the click and change events: https://github.com/metaweta/jquery-ui/commit/df77b43f08c593ed5a21323c02cc51b8ada37b02
Changed May 02, 2012 08:00PM UTC by comment:15
#8239 is a duplicate of this ticket.
Changed May 02, 2012 08:01PM UTC by comment:16
#8290 is a duplicate of this ticket.
Changed May 02, 2012 08:01PM UTC by comment:17
summary: | DatePicker does not respond to any click events in AIR → DatePicker does not respond to any click events in AIR, Google Sites, Windows Metro |
---|
Changed May 02, 2012 08:09PM UTC by comment:18
Given the longstanding demand for this bug and the existence of a fix, can we get the status returned to blocker?
Changed June 06, 2012 02:00PM UTC by comment:19
resolution: | → fixed |
---|---|
status: | new → closed |
Datepicker: Pulled event handlers into static code. Fixed #3945 - DatePicker does not respond to any click events in AIR, Google Sites, Windows Metro.
Changeset: 6dcc5c14c824ae9d653b1bc293680f6af6baf1b4
Changed June 06, 2012 02:00PM UTC by comment:20
Datepicker: Pulled event handlers into static code. Fixed #3945 - DatePicker does not respond to any click events in AIR, Google Sites, Windows Metro.
(cherry picked from commit 6dcc5c14c824ae9d653b1bc293680f6af6baf1b4)
Changeset: 831333a10aebad00b30d51cb274f463240c56814
Changed June 06, 2012 02:00PM UTC by comment:21
milestone: | 1.next → 1.8.22 |
---|
Changed October 19, 2012 07:37PM UTC by comment:22
#7826 is a duplicate of this ticket.
Changed August 22, 2013 08:01AM UTC by comment:23
I didnt get the final solution How can I modify the date picker to be able to use click event. thanks
We're going to aim for full AIR support in 1.7.