Javascript Date Range Picker - Single Calendar for Range Selection

后端 未结 2 1747
野的像风
野的像风 2020-12-17 04:23

I\'m using this date range picker component: http://www.daterangepicker.com/ and by default the widget shows two calendars. I would like to show only one calendar and be abl

相关标签:
2条回答
  • 2020-12-17 04:35

    Code to remove second calendar for: http://www.daterangepicker.com Will be able to select a date range within one calendar.

    /* REMOVE SECOND CALENDAR */
    
    .daterangepicker .drp-calendar.right {
        position: absolute !important;
        right: 0 !important;
        top: 0 !important;
    }
    
    .daterangepicker .drp-calendar.right tbody {
        display: none !important;
    }
    
    .daterangepicker .drp-calendar.right thead > tr:nth-child(2) {
        display: none !important;
    }
    
    .daterangepicker .drp-calendar.right th.month {
        display: none !important;
    }
    
    .daterangepicker .drp-calendar.right .calendar-table {
        background: transparent !important;
    }
    
    .daterangepicker .daterangepicker.ltr .ranges, .daterangepicker.ltr .drp-calendar {
        float: none !important;
    }
    
    .daterangepicker .drp-calendar.right .daterangepicker_input {
        position: absolute !important;
    }
    
    /* REMOVE SECOND CALENDAR */
    
    0 讨论(0)
  • 2020-12-17 04:47

    I was also having the same problem but overcome it with adding some css in it, hope it also helps you.

    .drp-calendar.right thead>tr:nth-child(2) {
        display: none;
    }
    .drp-calendar.right tbody {
        display: none;
    }
    .daterangepicker.ltr .ranges, .daterangepicker.ltr .drp-calendar {
        float: none !important;
    }
    .daterangepicker .drp-calendar.right .daterangepicker_input {
        position: absolute;
        top: 45px;
        left: 8px;
        width: 230px;
    }
    .drp-calendar.left .drp-calendar-table {
        margin-top: 45px;
    }

    0 讨论(0)
提交回复
热议问题