Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing bootstrap datepicker with jQueryUI datepicker #712

Closed
gamosoft opened this issue Jul 10, 2018 · 4 comments
Closed

Replacing bootstrap datepicker with jQueryUI datepicker #712

gamosoft opened this issue Jul 10, 2018 · 4 comments

Comments

@gamosoft
Copy link

Hi there, I guess the title says it all but what would be the easiest way to replace the bootstrap datepicker with the one provided by jQuery UI (https://jqueryui.com/datepicker/)?

We already have a lot of code written using the bootstrap version, so we're aiming for the less disruptive take on the replacement.

Thanks a lot!

@mistic100
Copy link
Owner

mistic100 commented Jul 10, 2018

Both have the same name in jQuery namespace, so just load jQuery UI instead of Bootstrap and adapt the "plugin_options" on your filter.

@mistic100
Copy link
Owner

mistic100 commented Jul 10, 2018

And if you want both, try something like

$.fn.uiDatePicker = $.fn.datepicker.noConflict();
// this will reassign $.fn.datepicker to Bootstrap Datepicker

(given jquery Ui is loaded after Bootstrap)

and use "uiDatepicker" as plugin in QueryBuilder

But IMHO having too different datepicker in the same app is insane !

@mistic100
Copy link
Owner

@gamosoft
Copy link
Author

That works just seamless, just need to tweak a few items and it all integrates nicely. 👍

Thanks a lot mate!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants