tiny-date-picker icon indicating copy to clipboard operation
tiny-date-picker copied to clipboard

appendTo inside relative position

Open sabob opened this issue 5 years ago • 3 comments

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

sabob avatar Mar 03 '19 12:03 sabob

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

Thanks!

Jon

jonkelling avatar Jun 01 '19 17:06 jonkelling

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

sporifolous avatar Feb 28 '20 16:02 sporifolous

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

CaptainCannabis avatar Jul 20 '20 00:07 CaptainCannabis