Search and Top Navigation
#6733 closed bug (duplicate)
Opened December 08, 2010 04:55PM UTC
Closed October 19, 2012 04:26PM UTC
datepicker bug: error with selecting dates with multiple calendars
Reported by: | Enoah Netzach | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.11.0 |
Component: | ui.datepicker | Version: | 1.8.6 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Using Google Chrome 8.0.552.215
, Mozilla Firefox 3.6.12
, Safari 5.0.2
on a iMac 7,1
with Mac OS X 10.6.5
;
Using jquery 1.4.2
and jquery-ui 1.8.6
:
Using datepicker inline with multiple calendars (**numberOfMonths**>=2) and **showCurrentAtPos**=1, when clicking on a date in the last month on right, the datepicker does not update in the right position, centering on the last selected day, but goes back to the month before the first on the left side.
Used Code
#!div style="font-size: 100%" Html: {{{#!text/html <body> <div id="foo"></div> </body>
}}}
#!div style="font-size: 100%" Html: {{{#!js $('#foo').datepicker({ numberOfMonths: 2, showCurrentAtPos: 1 })
}}}
Online Example
Attachments (0)
Change History (4)
Changed December 08, 2010 05:03PM UTC by comment:1
_comment0: | partially fixed triggering two custom jQuery events on **$('body')**: \ 1. at the very end of $.datepicker._updateDatepicker function (**'update'** event) \ 2. at the very beginning of $.datepicker._updateDatepicker function (**'gotoToday'** event) \ and managing them in a very long and crazy way.. \ \ {{{ \ #!div style="font-size: 100%" \ Code highlighting: \ {{{#!js \ var reallyUpdated = false; \ $('table.ui-datepicker-calendar > tbody > tr > td').live('mousemove mouseleave', function(event) \ { \ (event.type == 'mousemove') ? reallyUpdated = true : reallyUpdated = false; \ }) \ $('.ui-datepicker-buttonpane > button.ui-datepicker-current').live('mousemove mouseleave mousedown', function(event) \ { \ (event.type == 'mousemove') ? reallyUpdated = true : reallyUpdated = false; \ }) \ $('body').live('update', function() \ { \ if (reallyUpdated) \ { \ $('.ui-datepicker-buttonpane > button.ui-datepicker-current').trigger('click'); \ reallyUpdated = false; \ } \ }); \ $('body').live('gotoToday', function() \ { \ reallyUpdated = false; \ }) \ }}} \ }}} \ \ → 1291827952849942 |
---|
Changed March 11, 2011 05:51PM UTC by comment:2
This ticket is related to #6225 which also appears to have a simpler fix.
Changed October 11, 2012 02:43PM UTC by comment:3
milestone: | 1.9.0 → 1.11.0 |
---|
partially fixed adding the datepicker option **showButtonPanel: true** triggering two custom jQuery events on **$('body')**:
1. at the very end of $.datepicker._updateDatepicker function (**'update'** event)
2. at the very beginning of $.datepicker._updateDatepicker function (**'gotoToday'** event)
and managing them in a very long and crazy way..
}}}