Paul-DS / bootstrap-year-calendar

[DEPRECATED] A fully customizable year calendar widget, for boostrap !
Apache License 2.0
294 stars 243 forks source link

is it possible hide already passed months? #146

Closed korkuttaha closed 7 years ago

korkuttaha commented 7 years ago

Hello,

There is disable days option but is it possible to hide fully passed months aswell?

Best wishes

William-H-M commented 7 years ago

Hi, please refer to

18

101

This can be closed as the examples there do what the issue is about it.

korkuttaha commented 7 years ago

Thanks, with this code, its working.

renderEnd: function (e) { var currentMonth = new Date().getMonth(); $('#calendar .month-container').each(function (idx, el) { if (idx < currentMonth) { $(this).css("display", "none"); } if (idx > currentMonth + 12) { $(this).css("display", "none"); } }); },