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

contextMenu goes off screen #150

Open
pdarkness opened this issue Jun 6, 2017 · 1 comment
Open

contextMenu goes off screen #150

pdarkness opened this issue Jun 6, 2017 · 1 comment

Comments

@pdarkness
Copy link
Contributor

image

@fivelas
Copy link

fivelas commented Oct 11, 2017

you have to customize bootstrap-year-calendar.js

Find this line: contextMenu.css('left', elt.offset().left + 25 + 'px');

And then customize the value 25 to fit your needs. I did like this for my own need:

var offset=25;
if (elt.offset().left>window.innerWidth-200)
     offset=-200;
                            
contextMenu.css('left', elt.offset().left + offset + 'px');

You should change the value 200 accordingly.
You can do the same for the Height if you encounter that problem.

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