chrisdavies / tiny-date-picker

A small, modern, dependency-free date picker
https://chrisdavies.github.io/tiny-date-picker/
415 stars 88 forks source link

appendTo inside relative position #105

Open sabob opened 5 years ago

sabob commented 5 years ago

Hi all,

In the latest release 3.2.8 the appendTo feature is documented but not included in the build file https://github.com/chrisdavies/tiny-date-picker/blob/master/dist/tiny-date-picker.js.

I've built tiny-picker from source but ran into a minor issue with the calendar position when using mode="dp-below" and appendTo. Here is a fiddle:

In this fiddle, https://jsfiddle.net/sabob/80v2t6g4/28 I use bootstrap grid.

There are two datepickers, one appended to body (default) and one appendTo a span.

Notice the second datepicker renders to the right of the input.

I think this has to do because children of the Bootstrap container class has position : relative and hence the datepicker algorithm to find the best position is wrong? When datepicker is appended to body it works correctly.

Not sure if it will be possible to fix though?

Kind regards

Bob

jonkelling commented 5 years ago

Any update on this? The npm package appears to be missing the update.

Thanks!

Jon

sporifolous commented 4 years ago

I was having the same problem. Sadly looks like this hasn't been updated in over a year, despite a PR with a fix.

CaptainCannabis commented 4 years ago

same to me - calender is appended to the body, always. Using v3.2.8 via npm