Fo any future readers... it turns out that this works for me in my personal
situation:
jQuery('#ui-datepicker-div').click(function(e){
e.stopPropagation();
});
However, it feels like a bit of a hack because you may not always want to
stop propagation so you have to do a good amount of additional lookup into
the datepicker to see if the input it is targeting is inside of an open
dropdown (not as big of a deal).
Also, for some reason binding it like this jQuery('html').on('click',
'#ui-datepicker-div', function(e){}); never actually fires. I'm not sure
if this is a datepicker issue or a bootstrap issue with some other type of
propagation stopping.
-Greg
On Thursday, June 7, 2012 8:49:00 PM UTC-4, Greg Moser wrote:
>
> So you don't think that there is any way to accomplish the same goal
> without modifying the core? I feel like I should be able to intersept that
> event and stop the propagation... is that just not possible?
>
> -Greg
>
> On Thursday, June 7, 2012 12:19:27 PM UTC-4, Donald Organ wrote:
>>
>> If you look in bootstrap-dropdown.js there are two place where the
>> method clearMenus() is called. You will probably have to create a copy
>> of this modify it to your needs.
>>
>>
>>
>> On Thu, Jun 7, 2012 at 11:50 AM, Greg Moser <[email protected]> wrote:
>>
>>> Yes, I have seen that project and in fact the datepicker is from that
>>> project. Really doesn't address the underlying issue in
>>> my previous question, but I do appreciate any ideas :)
>>>
>>> -Greg
>>>
>>> On Thursday, June 7, 2012 10:20:06 AM UTC-4, Kevin Ridgway wrote:
>>>>
>>>> Maybe checkout this project which aims to combine jquery UI with
>>>> Bootstrap:
>>>>
>>>> http://addyosmani.github.com/**jquery-ui-bootstrap<http://addyosmani.github.com/jquery-ui-bootstrap>
>>>>
>>>>
>>>> Perhaps you can glean something from that?
>>>>
>>>> On Jun 7, 2012, at 9:52 AM, Greg Moser <[email protected]> wrote:
>>>>
>>>> > Hey all,
>>>> >
>>>> > I have a bootstrap dropdown at the top's of my listing tables. Each
>>>> of those dropdowns include some dynamic ui tools. One of those UI tools
>>>> is
>>>> a Range selector that is setup using the jQuery-UI datepicker.
>>>> >
>>>> > The problem is that when I select a date, the underlying dropdown
>>>> closes. I'm trying to figure out what event to stop propagation on,
>>>> because I don't want it to close until it is clicked off of. In fact I
>>>> don't even want it to close when "Done" is clicked.
>>>> >
>>>> > Here is a video of the problem in action: http://screencast.com/t/**
>>>> 0BwieyA3S <http://screencast.com/t/0BwieyA3S>
>>>> >
>>>> > My thinking is that this is because the bootstrap dropdown has
>>>> something that is looking for click events outside of the dropdown (which
>>>> would include the datepicker in this instance). How can I add the
>>>> datepicker x/y coordinates to the scope of what not to close on that would
>>>> be very helpful
>>>> >
>>>> > Any direction or ideas are MUCH appreciated.
>>>> >
>>>> > -Greg
>>>>
>>>
>>