longbill / jquery-date-range-picker

A jQuery plugin that allows user to select a date range
MIT License
1.12k stars 579 forks source link

When rendering to custom container, dates don't show up #329

Open macandcheese opened 7 years ago

macandcheese commented 7 years ago

Looking for a tip to point me in the right direction here. I'm trying to configure the datepicker to show up inline, by default, in a container other than "body".

No matter what combination of settings I try, rendering to any div other than "body" will result in the month being empty (displays table headers for days, but no month title or any day objects) and "top bar" just displays "default". It's almost like it can't access moment.js (but no errors in console).

Everything works with my settings when container is "body", the second I change that to another div, it can't display any dates.

Any experience with this issue?

macandcheese commented 7 years ago

Well, verified fix: it won't accept a class (even if only one instance exists in DOM), only an id.