_daterangepicker.scss 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  1. .daterangepicker {
  2. position: absolute;
  3. color: inherit;
  4. background-color: $white;
  5. border-radius: 4px;
  6. border: 1px solid $border;
  7. width: 278px;
  8. max-width: none;
  9. padding: 0;
  10. margin-block-start: 7px;
  11. inset-block-start: 100px;
  12. inset-inline-start: 20px;
  13. z-index: 3001;
  14. display: none;
  15. font-family: arial;
  16. font-size: 15px;
  17. line-height: 1em;
  18. &:before, &:after {
  19. position: absolute;
  20. display: inline-block;
  21. border-block-end-color : $black-2;
  22. content: '';
  23. }
  24. &:before {
  25. inset-block-start: -7px;
  26. border-inline-end: 7px solid transparent;
  27. border-inline-start: 7px solid transparent;
  28. border-block-end: 7px solid $border;
  29. }
  30. &:after {
  31. inset-block-start: -6px;
  32. border-inline-end: 6px solid transparent;
  33. border-block-end: 6px solid $white;
  34. border-inline-start: 6px solid transparent;
  35. }
  36. &.opensleft {
  37. &:before {
  38. inset-inline-end: 9px;
  39. }
  40. &:after {
  41. inset-inline-end: 10px;
  42. }
  43. }
  44. &.openscenter {
  45. &:before, &:after {
  46. inset-inline-start: 0;
  47. inset-inline-end: 0;
  48. width: 0;
  49. margin-inline-start: auto;
  50. margin-inline-end: auto;
  51. }
  52. }
  53. &.opensright {
  54. &:before {
  55. inset-inline-start: 9px;
  56. }
  57. &:after {
  58. inset-inline-start: 10px;
  59. }
  60. }
  61. &.drop-up {
  62. margin-block-start: -7px;
  63. &:before {
  64. inset-block-start: initial;
  65. inset-block-end: -7px;
  66. border-block-end: initial;
  67. border-block-start: 7px solid $border;
  68. }
  69. &:after {
  70. inset-block-start: initial;
  71. inset-block-end: -6px;
  72. border-block-end: initial;
  73. border-block-start: 6px solid $white;
  74. }
  75. }
  76. &.single {
  77. .daterangepicker .ranges, .drp-calendar {
  78. float: none;
  79. }
  80. .drp-selected {
  81. display: none;
  82. }
  83. }
  84. &.show-calendar {
  85. .drp-calendar, .drp-buttons {
  86. display: block;
  87. }
  88. }
  89. &.auto-apply .drp-buttons {
  90. display: none;
  91. }
  92. .drp-calendar {
  93. display: none;
  94. max-width: 270px;
  95. &.left {
  96. padding: 8px 0 8px 8px;
  97. }
  98. &.right {
  99. padding: 8px;
  100. }
  101. &.single .calendar-table {
  102. border: none;
  103. }
  104. }
  105. .calendar-table {
  106. .next span, .prev span {
  107. color: $white;
  108. border: solid $border;
  109. border-width: 0 2px 2px 0;
  110. border-radius: 0;
  111. display: inline-block;
  112. padding: 3px;
  113. }
  114. .next span {
  115. transform: rotate(-45deg);
  116. -webkit-transform: rotate(-45deg);
  117. }
  118. .prev span {
  119. transform: rotate(135deg);
  120. -webkit-transform: rotate(135deg);
  121. }
  122. th, td {
  123. white-space: nowrap;
  124. text-align: center;
  125. vertical-align: middle;
  126. min-width: 32px;
  127. width: 32px;
  128. height: 24px;
  129. line-height: 24px;
  130. font-size: 12px;
  131. border-radius: 4px;
  132. border: 1px solid transparent;
  133. white-space: nowrap;
  134. cursor: pointer;
  135. }
  136. border: 1px solid $border;
  137. border-radius: 4px;
  138. background-color: $white;
  139. table {
  140. width: 100%;
  141. margin: 0;
  142. border-spacing: 0;
  143. border-collapse: collapse;
  144. }
  145. }
  146. td.available:hover, th.available:hover {
  147. background-color: $white;
  148. border-color: transparent;
  149. color: inherit;
  150. }
  151. td.week, th.week {
  152. font-size: 80%;
  153. color: $border;
  154. }
  155. td {
  156. &.off {
  157. background-color: $white;
  158. border-color: transparent;
  159. color: $default-color;
  160. &.in-range, &.start-date, &.end-date {
  161. background-color: $white;
  162. border-color: transparent;
  163. color: $default-color;
  164. }
  165. }
  166. &.in-range {
  167. background-color: $white;
  168. border-color: transparent;
  169. color: $default-color;
  170. border-radius: 0;
  171. }
  172. &.start-date {
  173. border-radius: 4px 0 0 4px;
  174. }
  175. &.end-date {
  176. border-radius: 0 4px 4px 0;
  177. }
  178. &.start-date.end-date {
  179. border-radius: 4px;
  180. }
  181. &.active {
  182. background-color: $primary-1;
  183. border-color: transparent;
  184. color: $white;
  185. &:hover {
  186. background-color: $primary-1;
  187. border-color: transparent;
  188. color: $white;
  189. }
  190. }
  191. }
  192. th.month {
  193. width: auto;
  194. }
  195. td.disabled, option.disabled {
  196. color: $default-color;
  197. cursor: not-allowed;
  198. text-decoration: line-through;
  199. }
  200. select {
  201. &.monthselect, &.yearselect {
  202. font-size: 12px;
  203. padding: 1px;
  204. height: auto;
  205. margin: 0;
  206. cursor: default;
  207. }
  208. &.monthselect {
  209. margin-inline-end: 2%;
  210. width: 56%;
  211. }
  212. &.yearselect {
  213. width: 40%;
  214. }
  215. &.hourselect, &.minuteselect, &.secondselect, &.ampmselect {
  216. width: 50px;
  217. margin: 0 auto;
  218. background: $white;
  219. border: 1px solid $border;
  220. padding: 2px;
  221. outline: 0;
  222. font-size: 12px;
  223. }
  224. }
  225. .calendar-time {
  226. text-align: center;
  227. margin: 4px auto 0 auto;
  228. line-height: 30px;
  229. position: relative;
  230. select.disabled {
  231. color: $border;
  232. cursor: not-allowed;
  233. }
  234. }
  235. .drp-buttons {
  236. clear: both;
  237. text-align: end;
  238. padding: 8px;
  239. border-block-start: 1px solid $border;
  240. display: none;
  241. line-height: 12px;
  242. vertical-align: middle;
  243. }
  244. .drp-selected {
  245. display: inline-block;
  246. font-size: 12px;
  247. padding-inline-end: 8px;
  248. }
  249. .drp-buttons .btn {
  250. margin-inline-start: 8px;
  251. font-size: 12px;
  252. font-weight: bold;
  253. padding: 4px 8px;
  254. }
  255. &.show-ranges {
  256. &.single {
  257. &.rtl .drp-calendar.left {
  258. border-inline-end: 1px solid $border;
  259. }
  260. &.ltr .drp-calendar.left {
  261. border-inline-start: 1px solid $border;
  262. }
  263. }
  264. &.rtl .drp-calendar.right {
  265. border-inline-end: 1px solid $border;
  266. }
  267. &.ltr .drp-calendar.left {
  268. border-inline-start: 1px solid $border;
  269. }
  270. }
  271. .ranges {
  272. float: none;
  273. text-align: start;
  274. margin: 0;
  275. }
  276. &.show-calendar .ranges {
  277. margin-block-start: 8px;
  278. }
  279. .ranges {
  280. ul {
  281. list-style: none;
  282. margin: 0 auto;
  283. padding: 0;
  284. width: 100%;
  285. }
  286. li {
  287. font-size: 12px;
  288. padding: 8px 12px;
  289. cursor: pointer;
  290. &:hover {
  291. background-color: $white;
  292. }
  293. &.active {
  294. background-color: $primary-1;
  295. color: $white;
  296. }
  297. }
  298. }
  299. }
  300. /* Larger Screen Styling */
  301. @media (min-width: 564px) {
  302. .daterangepicker {
  303. width: auto;
  304. .ranges ul {
  305. width: 140px;
  306. }
  307. &.single {
  308. .ranges ul {
  309. width: 100%;
  310. }
  311. .drp-calendar.left {
  312. clear: none;
  313. }
  314. .ranges, .drp-calendar {
  315. float: $float-left;
  316. }
  317. }
  318. direction: ltr;
  319. text-align: start;
  320. .drp-calendar {
  321. &.left {
  322. clear: left;
  323. margin-inline-end: 0;
  324. .calendar-table {
  325. border-inline-end: none;
  326. border-start-end-radius: 0;
  327. border-end-end-radius: 0;
  328. }
  329. }
  330. &.right {
  331. margin-inline-start: 0;
  332. .calendar-table {
  333. border-inline-start: none;
  334. border-start-start-radius: 0;
  335. border-end-start-radius: 0;
  336. }
  337. }
  338. &.left .calendar-table {
  339. padding-inline-end: 8px;
  340. }
  341. }
  342. .ranges, .drp-calendar {
  343. float: $float-left;
  344. }
  345. }
  346. }
  347. @media (min-width: 730px) {
  348. .daterangepicker {
  349. .ranges {
  350. width: auto;
  351. float: $float-left;
  352. }
  353. &.rtl .ranges {
  354. float: $float-right;
  355. }
  356. .drp-calendar.left {
  357. clear: none !important;
  358. }
  359. }
  360. }