summaryrefslogtreecommitdiff
path: root/addons/web/static/src/scss/datepicker.scss
blob: 570c0c0140e88b9fa53d01dd637a5cc625860af0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.o_datepicker {
    position: relative;

    .o_datepicker_input {
        width: 100%;
        cursor: pointer;
    }

    .o_datepicker_button {
        @include o-position-absolute(2px, 4px);
        pointer-events: none; // let click events go through the underlying input
        &:after {
            @include o-caret-down;
        }
    }

    .o_datepicker_warning {
        top: 0;
        right: 20px;
    }
}


// The 'div.dropdown-menu' part is needed to override default bootstrap rule as
// this file is unfortunately placed in common assets.
div.dropdown-menu.bootstrap-datetimepicker-widget{
    // Need to put datetimepicker widget above everything else
    z-index: $zindex-modal + 1;

    // Also fix the dropdown width
    width: 19rem;
}

.datepicker {
    .table-sm {
        > thead {
            color: white;
            background-color: $o-brand-odoo;

            > tr {
                &:first-child {
                    th:hover {
                        color: white;
                        background-color: darken($o-brand-odoo, 10%);
                    }
                }

                &:last-child {
                    color: $o-datepicker-week-color;
                    background-color: $o-datepicker-week-bg-color;
                }
                > th {
                    border-radius: 0;
                }
            }
        }

        > tbody {
            > tr {
                > td {
                    &.active, .active {
                        background-color: $o-brand-primary;
                        border-radius: 100px;
                    }

                    &.today:before {
                        border-bottom-color: $o-brand-primary;
                    }
                }
            }
        }
    }
}

.picker-switch {
    span.fa {
        margin: 0;
        @include transition($btn-transition);
        &.primary {
            background-color: $o-brand-primary;
            color: white;
            &:hover {
                background-color: darken($o-brand-primary, 10%);
            }
        }
    }
}