Closed manquer closed 8 years ago
Have you looked at the date picker container option? On Dec 7, 2015 9:43 AM, "Manquer" notifications@github.com wrote:
Date picker is not visible if the input element is within a side nav list
— Reply to this email directly or view it on GitHub https://github.com/Dogfalo/materialize/issues/2439.
Thank you :) the container options worked. Since I believe you have already customized and modified the original plugin, perhaps you can set this automatically as default for such elements?
Also it would be helpful if there is a link in the documentation to the docs page,
Hello,
I have the same problem with datepicker not displaying within a side nav list. Could you explain a little more your answer about 'the container option'?
Thanks
If you don't initialize the picker with jQuery, you may set some options.... One of these options is the "container"
var dateElems = document.querySelectorAll('.datepicker');
var options = {
autoClose: true,
showClearBtn: false,
firstDay: 1,
selectMonths: true,
selectYears: 2,
setDefaultDate: true,
container: "body",
i18n: {
months: months,
monthsShort: monthsShort,
weekdays: weekdays,
weekdaysShort: weekdaysShort,
weekdaysAbbrev: weekdaysAbbrev,
today: today,
clear: clear,
close: close
}
};
M.Datepicker.init(dateElems, options);
Date picker is not visible if the input element is within a side nav list