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

Support fluid / responsive layouts (avoid hardcoded widths and heights) #19

Closed
kwando opened this issue Apr 22, 2014 · 7 comments
Closed
Assignees

Comments

@kwando
Copy link

kwando commented Apr 22, 2014

I really do like this plugin, and it works like a charm! I use it do display a inline calendar with the always_visible option.

The hardcoded heights and widths combined with a responsive layout does not work that great when resizing a browser window though =/ I have to refresh the browser for it to recalculate the widths/heights. I know there is a update method, but I do not wanna resort to window.resize or use some black magic to watch mediaqueries.

@blessanm86
Copy link

👍 If we have our input field hidden with display:none, the icon position is not correct and I will have to call update to recalculate. It would be good if the icon position was a css solution.

@jeffisowens
Copy link

I'm running into this same issue. I would love to be able to set the width of the calendar to a percentage or even to just have an option to let it fill its container.

@LukeMcLachlan
Copy link

have you tried making the width a percentage? I have a fixed width of 200px and it works great.

@jeffisowens
Copy link

You mean within the js code? Because if I set it via CSS, the js overrides
it.

On Tue, Jun 30, 2015 at 6:15 AM Luke McLachlan notifications@github.com
wrote:

have you tried making the width a percentage? I have a fixed width of
200px and it works great.


Reply to this email directly or view it on GitHub
#19 (comment)
.

@imranzahid01
Copy link

Just my 2 cents
I am using Bootstrap4 and if my date-field is hidden then I am having the above issue. What I did was after initialization I remove the calculated width like:

$('.datepicker').Zebra_DatePicker({
  format: 'M d, Y',
  show_week_number: 'Wk'
});
$('.Zebra_DatePicker_Icon_Wrapper').each(function() {
  $(this).css('width', '');
});

@ppazos
Copy link

ppazos commented Mar 16, 2023

Just found this issue, I have a container div that is hidden by default then it's shown and contains some pickers, the pickers container span has width: 0px on it making it's width and the calendar icon to be broken.

Screenshot 2023-03-16 at 00-01-22 Atomik

With @imranzahid01 solution:

Screenshot 2023-03-16 at 00-02-30 Atomik

@stefangabos
Copy link
Owner

the fix from @imranzahid01 made its way into the plugin's code - thank you!

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

No branches or pull requests

7 participants