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

Change datetimepicker lib #711

Closed
kdiogenes opened this issue Mar 24, 2016 · 1 comment
Closed

Change datetimepicker lib #711

kdiogenes opened this issue Mar 24, 2016 · 1 comment

Comments

@kdiogenes
Copy link
Contributor

I'm using this datetimepicker: https://eonasdan.github.io/bootstrap-datetimepicker/

I'm also integrating Comfy to my layout, for this I'm adding my assets before the Comfy ones, the layout I'm using for Comfy has the current lines in head:

= stylesheet_link_tag    'dashboard', media: 'all', 'data-turbolinks-track' => true
= stylesheet_link_tag    'comfy/admin/cms/application', 'data-turbolinks-track' => true
= javascript_include_tag 'dashboard', 'data-turbolinks-track' => true
= javascript_include_tag 'comfy/admin/cms/application', 'data-turbolinks-track' => true

The datetimepicker used in Comfy makes use of the noConflict strategy, and I expected that this would save the $.fn.datetimepicker that I'm using, but for some reason, when the noConflict code is executed, $.fn.datetimepicker is undefined. I already make some debug, googled about it, but didn't find an explication to why $.fn.datetimepicker is undefined, since my javascript is already loaded when Comfy datetimepicker is loaded. Due this, I decide to replace this lib in my local Comfy code.

I think that this datetimepicker that I'm using has a better UX than the current one in Comfy. @GBH, since I will do this work in my local code, I would like to hear if you think that this another datetimepicker is an improvement, and in an affirmative case I can provide a PR to replace it.

Best regards!

@GBH
Copy link
Member

GBH commented Nov 9, 2017

Datepicker is changed to Flatpickr now. It's still possible to change it to whatever by overriding CMS.timepicker() method.

@GBH GBH closed this as completed Nov 9, 2017
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