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

showIcon=false causes an exception #79

Open
jaurand opened this issue Jul 14, 2020 · 3 comments
Open

showIcon=false causes an exception #79

jaurand opened this issue Jul 14, 2020 · 3 comments

Comments

@jaurand
Copy link

jaurand commented Jul 14, 2020

If you set showIcon to false then you get the following exception when opening the picker:

bootstrap-datetimepicker.js:426 Uncaught TypeError: Cannot read property 'top' of undefined
    at place (bootstrap-datetimepicker.js:426)
    at Object.show (bootstrap-datetimepicker.js:1254)
    at Class.focus (bs-datetimepicker.js:113)
    at Backburner._run (backburner.js:758)
    at Backburner._join (backburner.js:736)
    at Backburner.join (backburner.js:477)
    at Function.run.join (ember-metal.js:4366)
    at action.js:364
    at exports.flaggedInstrument (ember-metal.js:3920)
    at HTMLInputElement.<anonymous> (action.js:363)

I think this is because the input-group class is always added, but it's only needed if the icon is rendered.

@henkkasoft
Copy link

Noticed the same problem. I removed the showicon=false and hide it in scss with input-group-addon display: none

.date {
  .input-group-addon {
    display: none;
  }
}

@btecu
Copy link
Owner

btecu commented Mar 12, 2021

Can you create a reproduction in an ember-twiddle or something?

@henkkasoft
Copy link

Sorry, I am a little busy just now, maybe later I have time to try to reproduce.

This is how the component is called when the problem occur:
{{bs-datetimepicker date=model.startAt allowInputToggle=true showIcon=false}}

"ember-cli-bootstrap-datetimepicker": "^0.9.3",

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

3 participants