_vendor.datetimepicker.scss 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. .xdsoft_datetimepicker {
  2. box-shadow: 0 5px 10px -5px rgba(0, 0, 0, 0.4);
  3. background: $color-white;
  4. border: 1px solid $color-input-focus-border;
  5. padding: 8px;
  6. padding-left: 0;
  7. padding-top: 2px;
  8. position: absolute;
  9. z-index: 5;
  10. box-sizing: border-box;
  11. display: none;
  12. * {
  13. box-sizing: border-box;
  14. padding: 0;
  15. margin: 0;
  16. }
  17. iframe {
  18. position: absolute;
  19. left: 0;
  20. top: 0;
  21. width: 75px;
  22. height: 210px;
  23. background: transparent;
  24. border: 0;
  25. }
  26. .xdsoft_datepicker,
  27. .xdsoft_timepicker {
  28. display: none;
  29. &.active {
  30. display: block;
  31. }
  32. }
  33. .xdsoft_datepicker {
  34. float: left;
  35. margin-left: 8px;
  36. }
  37. .xdsoft_datepicker.active + .xdsoft_timepicker {
  38. margin-top: 8px;
  39. margin-bottom: 3px;
  40. }
  41. .xdsoft_mounthpicker {
  42. position: relative;
  43. text-align: center;
  44. }
  45. .xdsoft_next,
  46. .xdsoft_prev,
  47. .xdsoft_today_button {
  48. background-color: transparent;
  49. cursor: pointer;
  50. display: block;
  51. border: 0;
  52. overflow: hidden;
  53. padding: 5px 0;
  54. position: relative;
  55. white-space: nowrap;
  56. width: 2em;
  57. color: $color-teal;
  58. text-transform: none;
  59. text-align: center;
  60. &:before {
  61. font-size: 1.5em;
  62. font-family: wagtail;
  63. width: 1em;
  64. line-height: 1.3em;
  65. text-align: center;
  66. margin: 0;
  67. }
  68. &:hover {
  69. color: $color-teal-darker;
  70. }
  71. }
  72. .xdsoft_prev {
  73. float: left;
  74. &:before {
  75. content: map-get($icons, 'arrow-left');
  76. }
  77. }
  78. .xdsoft_today_button {
  79. float: left;
  80. margin-left: 5px;
  81. &:before {
  82. content: map-get($icons, 'home');
  83. }
  84. }
  85. .xdsoft_next {
  86. float: right;
  87. &:before {
  88. content: map-get($icons, 'arrow-right');
  89. }
  90. }
  91. .xdsoft_timepicker {
  92. min-width: 70px;
  93. float: left;
  94. text-align: center;
  95. margin-left: 8px;
  96. margin-top: 0;
  97. .xdsoft_prev,
  98. .xdsoft_next {
  99. float: none;
  100. height: 1.5em;
  101. display: block;
  102. text-align: center;
  103. width: 100%;
  104. padding: 0;
  105. &:before {
  106. width: 100%;
  107. }
  108. }
  109. .xdsoft_prev:before {
  110. content: map-get($icons, 'arrow-up');
  111. }
  112. .xdsoft_next:before {
  113. content: map-get($icons, 'arrow-down');
  114. }
  115. .xdsoft_time_box {
  116. position: relative;
  117. border: 1px solid #ccc;
  118. height: 170px;
  119. overflow: hidden;
  120. border-bottom: 1px solid #ddd;
  121. > div > div {
  122. background: #f5f5f5;
  123. border-top: 1px solid #ddd;
  124. color: #666;
  125. font-size: 1em;
  126. text-align: center;
  127. border-collapse: collapse;
  128. cursor: pointer;
  129. border-bottom-width: 0;
  130. height: 2.3em;
  131. line-height: 2.3em;
  132. padding-left: 0.6em;
  133. padding-right: 0.6em;
  134. // stylelint-disable-next-line max-nesting-depth
  135. &:first-child {
  136. border-top-width: 0;
  137. }
  138. }
  139. }
  140. }
  141. .xdsoft_label {
  142. display: inline;
  143. position: relative;
  144. z-index: 9999;
  145. margin: 0;
  146. padding: 5px 3px;
  147. font-size: 14px;
  148. line-height: 20px;
  149. font-weight: bold;
  150. background-color: $color-white;
  151. float: left;
  152. width: 182px;
  153. text-align: center;
  154. cursor: pointer;
  155. &:hover {
  156. text-decoration: underline;
  157. }
  158. > .xdsoft_select {
  159. border: 1px solid #ccc;
  160. position: absolute;
  161. right: 0;
  162. top: 30px;
  163. z-index: 101;
  164. display: none;
  165. background: $color-white;
  166. max-height: 160px;
  167. overflow-y: hidden;
  168. &.xdsoft_monthselect {right: -7px;}
  169. &.xdsoft_yearselect {right: 2px;}
  170. > div > .xdsoft_option:hover {
  171. color: $color-white;
  172. background: #ff8000;
  173. }
  174. > div > .xdsoft_option {
  175. padding: 2px 15px 2px 5px;
  176. }
  177. > div > .xdsoft_option.xdsoft_current {
  178. background: #3af;
  179. color: $color-white;
  180. font-weight: 700;
  181. }
  182. }
  183. }
  184. .xdsoft_month {
  185. width: 90px;
  186. text-align: right;
  187. }
  188. .xdsoft_year {
  189. width: 56px;
  190. }
  191. .xdsoft_calendar {
  192. clear: both;
  193. table {
  194. border-collapse: collapse;
  195. }
  196. td > div {
  197. padding-right: 5px;
  198. }
  199. td,
  200. th {
  201. width: 14.285%;
  202. border: 1px solid #ddd;
  203. color: #666;
  204. font-size: 12px;
  205. text-align: right;
  206. padding: 5px 7px;
  207. border-collapse: collapse;
  208. cursor: pointer;
  209. height: 25px;
  210. }
  211. td {
  212. background-color: $color-white;
  213. }
  214. th {
  215. background: #f1f1f1;
  216. font-weight: 700;
  217. font-size: 0.85em;
  218. text-align: center;
  219. cursor: default;
  220. }
  221. }
  222. .xdsoft_calendar td.xdsoft_default,
  223. .xdsoft_calendar td.xdsoft_current,
  224. .xdsoft_timepicker .xdsoft_time_box > div > div.xdsoft_current {
  225. background: $color-salmon;
  226. color: $color-white;
  227. font-weight: 700;
  228. }
  229. .xdsoft_calendar td.xdsoft_other_month,
  230. .xdsoft_calendar td.xdsoft_disabled,
  231. .xdsoft_time_box > div > div.xdsoft_disabled {
  232. opacity: 0.5;
  233. background: $color-grey-3;
  234. }
  235. .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled {
  236. opacity: 0.2;
  237. }
  238. .xdsoft_calendar td:hover,
  239. .xdsoft_timepicker .xdsoft_time_box > div > div:hover {
  240. color: $color-white;
  241. background: $color-teal;
  242. }
  243. .xdsoft_calendar td.xdsoft_today {
  244. font-weight: 700;
  245. }
  246. }
  247. .xdsoft_noselect {
  248. user-select: none;
  249. }
  250. .xdsoft_noselect::selection { background: transparent; }
  251. .xdsoft_noselect::-moz-selection { background: transparent; }
  252. .xdsoft_datetimepicker.xdsoft_inline {
  253. display: inline-block;
  254. position: static;
  255. box-shadow: none;
  256. }
  257. .xdsoft_scroller_box {
  258. position: relative;
  259. }
  260. .xdsoft_scrollbar {
  261. position: absolute;
  262. width: 7px;
  263. right: 0;
  264. top: 0;
  265. bottom: 0;
  266. cursor: pointer;
  267. > .xdsoft_scroller {
  268. // stylelint-disable-next-line declaration-no-important
  269. background: #ccc !important;
  270. height: 20px;
  271. border-radius: 3px;
  272. }
  273. }