forked from RoXuS/range-datepicker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrange-datepicker-cell.html
More file actions
57 lines (45 loc) · 1.61 KB
/
range-datepicker-cell.html
File metadata and controls
57 lines (45 loc) · 1.61 KB
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
<link rel="import" href="../polymer/polymer-element.html">
<link rel="import" href="../iron-flex-layout/iron-flex-layout-classes.html">
<link rel="import" href="../paper-styles/color.html">
<link rel="import" href="../paper-styles/typography.html">
<link rel="import" href="moment-import.html">
<dom-module id="range-datepicker-cell">
<template>
<style include="iron-flex iron-flex-alignment">
:host {
@apply --paper-font-common-base;
display: block;
width: 38px;
}
div {
text-align: center;
height: 38px;
width: 38px;
margin: 0;
padding: 0;
color: var(--range-datepicker-cell-text);
}
div:not(.disabled):hover {
background: var(--range-datepicker-cell-hover, #e4e7e7);
cursor: pointer;
}
div.hovered {
background: var(--range-datepicker-cell-hovered, rgba(0, 150, 136, 0.5)) !important;
color: var(--range-datepicker-cell-hovered-text, white);
}
div.selected {
background: var(--range-datepicker-cell-selected, rgb(0, 150, 136)) !important;
color: var(--range-datepicker-cell-selected-text, white);;
}
div.disabled {
opacity: 0.4;
}
</style>
<div on-click="_handleTap" on-mouseover="_handleHover" class$="layout horizontal center center-justified [[_isSelected(_selected)]] [[_isHovered(_hovered)]] [[_isEnabled(day, min, max, disabledDays)]]">
<template is="dom-if" if="[[day]]">
[[day.title]]
</template>
</div>
</template>
<script src="range-datepicker-cell.js"></script>
</dom-module>