superdesk/superdesk-client-core

View on GitHub
styles/sass/daterangepicker.scss

Summary

Maintainability
Test Coverage

.daterangepicker {

  position: absolute;
  background: #fff;
  inset-block-start: 100px;
  inset-inline-start: 20px;
  padding: 4px;
  @include border-radius(4px);
  padding-block-start: 60px;
  padding-block-end: 42px;
  margin-block-start: 10px;
  margin-inline-start: -15px;

  &.dropdown__menu {
    max-width: none;
    z-index: 3000;
    width: 454px;
    border: 2px solid #7e7e7e;
  }

  &.opensleft {
    .calendar {
      float: inline-start;
      margin-inline-end: 4px;
    }
    &:before {
      position: absolute;
      inset-block-start: -7px;
      inset-inline-end: 9px;
      display: inline-block;
      border-inline-end: 7px solid transparent;
      border-block-end: 7px solid #ccc;
      border-inline-start: 7px solid transparent;
      border-bottom-color: rgba(0, 0, 0, 0.2);
      content: '';
    }
    &:after {
      position: absolute;
      inset-block-start: -6px;
      inset-inline-end: 10px;
      display: inline-block;
      border-inline-end: 6px solid transparent;
      border-block-end: 6px solid #fff;
      border-inline-start: 6px solid transparent;
      content: '';
    }
  }

  &.opensright {
    .calendar {
      float: inline-end;
      margin-inline-end: 4px;
    }
    &:before {

    }
    &:after {
      width:25px;
      height:13px;
      display: block;
      z-index: 9999;
      position: absolute;
      inset-block-start:-13px;
      inset-inline-start:10px;
      background: url(~images/dropdown-caret.png) no-repeat;
      content: " ";
    }
  }

  //ranges
  .ranges {
    text-align: start;
    position: absolute;
    inset-block-start: 0; inset-inline-start: 0; inset-inline-end: 0; inset-block-end: 0;
    z-index: 1;
    label {
      color: var(--color-text);
      font-size: 11px;
      margin-block-end: 2px;
      text-transform: uppercase;
      text-shadow: 1px 1px 0 #fff;
    }
    input {
      font-size: 11px;
      width: 100%;
    }
    ul {
      list-style: none;
      margin: 0;
      padding: 0;
      li {
        font-size: 13px;
        background: #f5f5f5;
        border: 1px solid #f5f5f5;
        color: #08c;
        padding: 3px 12px;
        margin-block-end: 8px;
        -webkit-border-radius: 5px;
        -moz-border-radius: 5px;
        border-radius: 5px;
        cursor: pointer;
        &.active, &:hover {
          background: #08c;
          border: 1px solid #08c;
          color: #fff;
        }
      }
    }
  }

  //buttons
  .applyBtn, .cancelBtn {
    position: absolute;
    inset-block-end: 8px;
    inset-inline-end: 10px;
  }
  .cancelBtn {
    inset-inline-end: 70px;
  }

  //dates
  .calendar-date {
    border: 1px solid #ddd;
    padding: 4px;
    border-radius: 4px;
    background: #fff;
  }
  .calendar-time {
    text-align: center;
    margin: 8px auto 0 auto;
    line-height: 30px;
  }


  //calendar
  .calendar {
    display: none;
    max-width: 250px;
    position: relative;
    z-index: 2;
    &.single .calendar-date {
      border: none;
    }

    table {
      width: 100%;
      margin: 0;
        th, td {
          text-align: center;
          width: 20px;
          height: 20px;
          -webkit-border-radius: 4px;
          -moz-border-radius: 4px;
          border-radius: 4px;
          cursor: pointer;
          white-space: nowrap;
          &.available {
            &:hover {
              background: #eee;
            }
          }
          &.week {
            font-size: 80%;
            color: #ccc;
          }
          &.month {
            width: auto;
          }
      }

      td {
        &.off {
          color: #999;
        }
        &.disabled {
          color: #999;
        }
        &.in-range {
          background: #ebf4f8;
          @include border-radius(0);
        }
        &.active {
          background: #3097b5;
          color: #fff;
          &:hover {
            background: #4cabc7;
          }
        }

      }//td

      .monthselect, .yearselect {
        font-size: 12px;
        padding: 1px;
        height: auto;
        margin: 0;
        cursor: default;
      }

      .monthselect {
        margin-inline-end: 2%;
        width: 56%;
      }
      .yearselect {
        width: 40%;
      }

      .hourselect, .minuteselect, .ampmselect {
        width: 60px;
        margin-block-end: 0;
      }


    }//table

  }

}

.daterangepicker_start_input, .daterangepicker_end_input {
  width: 220px;
  float: inline-start;
  margin-inline-start: 10px;
  margin-block-start: 5px;
}
 .daterangepicker_end_input {
  margin-inline-start: 4px;
 }