Comments (6)
Thank you for bringing this up.
Stay tuned while I check jQuery UI's source to see what we can do about this.
from jquery-ui-month-picker.
I was able to do this in the fiddle...
$('#Modal').dialog({
autoOpen: false,
title: 'MonthPicker Dialog Test',
modal: true,
close: function( event, ui ) {
$('body').trigger('click');
}
});
from jquery-ui-month-picker.
One more thing about this Ben...
Instead of just clicking the body to hide the menu I originally wanted to just call our API for close...
$('.selector').MonthPicker('Close')
But when I did that in the fiddle it did not seem to work.
I still look forward to hearing about how this issue is normally dealt with in jQuery UI plugins.
from jquery-ui-month-picker.
I haven't looked at the code yet but I suspect this problem occurs because they call event.stopPropagation()
on the close button's click event.
from jquery-ui-month-picker.
Looks like I've found the culprit, see: ui/widgets/dialog.js#L438.
from jquery-ui-month-picker.
Looks like this is happening not just because jQuery UI calls event.preventDefault()
but because we check if event.isDefaultPrevented()
in the Close() method.
I'm thinking we can clone the event and make sure event.preventDefault()
was called from within the OnBeforeMenuClose
event.
from jquery-ui-month-picker.
Related Issues (20)
- Datepicker's events no longer works HOT 1
- Suggestion: Add a reference to the monthpicker element for OnBeforeMenuOpen
- Wiki has an error for default Duration value
- jQuery Month picker dropdown dialog misaligned when zoomed in or zoomed out a webpage (refer the 3 images given) HOT 3
- show years first? HOT 1
- Fill in 2 hidden input field HOT 6
- Autoclose Support HOT 9
- Add support for Week/Year picker HOT 2
- Get the selected year HOT 6
- Jquery on Change HOT 5
- How to enable the year only? HOT 1
- Add source to project HOT 1
- Error: MonthPicker can only be called on text or month inputs. HOT 6
- ASP.NET Core 2.2?
- MonthPicker Error: The jQuery UI button and datepicker plug-ins must be loaded. HOT 1
- Fix broken links in Home wiki page
- Setting date manually. HOT 2
- How can i destroy Month Picker?
- "Jump Years" hint isn't working with jQuery 3.6.0 and jQuery UI 1.12.0
- MinMonth and MaxMonth aren't working with jQuery 3.6.0 and jQuery UI 1.12.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-ui-month-picker.