how to change bootstrap datepicker month view to display quarters

前端 未结 3 438
情书的邮戳
情书的邮戳 2020-12-09 17:35

I have an application where i have to submit monthly reports and quarterly reports. I am using the bootstrap-datepicker for the monthly report, and I want to keep the same s

3条回答
  •  鱼传尺愫
    2020-12-09 18:12

    a litte improvement and fix a issue when changing quarter typing in the input.

    remove

    .on("show", function(event) {
      $(".month").each(function(index, element) {
      if (index > 3) $(element).hide();
      });
     });
    

    add css

     .datepicker-months table tbody tr td span:nth-child(1n + 5) {
     background: red;
     display: none;
     }
    

提交回复
热议问题