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

Global TimePicker configuration not being respected (2.5.4) #205

Open
richardwalker-iamtech opened this issue Jul 31, 2017 · 0 comments
Open

Comments

@richardwalker-iamtech
Copy link

Hi,

It looks like the global time picker configuration (from plain bootstrap-ui) is not being respected when you change the showMeridian option to false. Some code in bootstrap-ui-datetime-picker looks to be overwriting the settings.

See around line 166 in dist/datetime-picker.js (or search for '// timepicker element'). It is looking to see if the scope's timepickerOptions have been set, which they are not, as I am relying on the global ones, then the code writes some (what looks like) junk into the options, which ui-bootstrap's code sees as truthy, so displays the AM/PM buttons. Or at least this is how it looked when I was stepping through both libraries in Chrome's debugger.

I have found that if I add an extra attribute to my HTML ('timepicker-options="true"') with a truthy value, then the issue is worked-around.

Please see this plunker for a simple example: https://plnkr.co/edit/CugDCh6jfPmKRTFlMoLm?p=preview

Apologies if this description does not make much sense!

Cheers,
Richard.

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

1 participant