datetimepicker.less 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  1. /*!
  2. * Datetimepicker for Bootstrap
  3. *
  4. * Copyright 2012 Stefan Petre
  5. * Improvements by Andrew Rowls
  6. * Improvements by Sébastien Malot
  7. * Licensed under the Apache License v2.0
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. */
  11. .datetimepicker {
  12. padding: 4px;
  13. margin-top: 1px;
  14. white-space: normal;
  15. -webkit-border-radius: 4px;
  16. -moz-border-radius: 4px;
  17. border-radius: 4px;
  18. direction: ltr;
  19. &.datetimepicker-rtl {
  20. direction: rtl;
  21. table {
  22. tr {
  23. td {
  24. span {
  25. float: right;
  26. }
  27. }
  28. }
  29. }
  30. }
  31. & > div {
  32. display: none;
  33. }
  34. &.minutes {
  35. div {
  36. &.datetimepicker-minutes {
  37. display: block;
  38. }
  39. }
  40. }
  41. &.hours {
  42. div {
  43. &.datetimepicker-hours {
  44. display: block;
  45. }
  46. }
  47. }
  48. &.days {
  49. div {
  50. &.datetimepicker-days {
  51. display: block;
  52. }
  53. }
  54. }
  55. &.months {
  56. div {
  57. &.datetimepicker-months {
  58. display: block;
  59. }
  60. }
  61. }
  62. &.years {
  63. div {
  64. &.datetimepicker-years {
  65. display: block;
  66. }
  67. }
  68. }
  69. table {
  70. margin: 0;
  71. tr {
  72. td {
  73. &.minute {
  74. &:hover {
  75. background: #eeeeee;
  76. cursor: pointer;
  77. }
  78. }
  79. &.hour {
  80. &:hover {
  81. background: #eeeeee;
  82. cursor: pointer;
  83. }
  84. }
  85. &.day {
  86. &:hover {
  87. background: #eeeeee;
  88. cursor: pointer;
  89. }
  90. }
  91. span {
  92. display: block;
  93. width: 23%;
  94. height: 54px;
  95. line-height: 54px;
  96. float: left;
  97. margin: 1%;
  98. cursor: pointer;
  99. -webkit-border-radius: 4px;
  100. -moz-border-radius: 4px;
  101. border-radius: 4px;
  102. &:hover {
  103. background: #eeeeee;
  104. }
  105. &.old {
  106. color: #999999;
  107. }
  108. }
  109. }
  110. }
  111. }
  112. .datetimepicker-hours {
  113. span {
  114. height: 26px;
  115. line-height: 26px;
  116. }
  117. }
  118. .datetimepicker-minutes {
  119. span {
  120. height: 26px;
  121. line-height: 26px;
  122. }
  123. }
  124. th {
  125. &.switch {
  126. width: 145px;
  127. }
  128. }
  129. }
  130. .datetimepicker-inline {
  131. width: 220px;
  132. }
  133. .datetimepicker-dropdown, .datetimepicker-dropdown-left {
  134. top: 0;
  135. left: 0;
  136. }
  137. [class*="datetimepicker-dropdown"]:before {
  138. content: '';
  139. display: inline-block;
  140. border-left: 7px solid transparent;
  141. border-right: 7px solid transparent;
  142. border-bottom: 7px solid #ccc;
  143. border-bottom-color: rgba(0, 0, 0, 0.2);
  144. position: absolute;
  145. }
  146. [class*="datetimepicker-dropdown"]:after {
  147. content: '';
  148. display: inline-block;
  149. border-left: 6px solid transparent;
  150. border-right: 6px solid transparent;
  151. border-bottom: 6px solid #ffffff;
  152. position: absolute;
  153. }
  154. [class*="datetimepicker-dropdown-top"]:before {
  155. content: '';
  156. display: inline-block;
  157. border-left: 7px solid transparent;
  158. border-right: 7px solid transparent;
  159. border-top: 7px solid #ccc;
  160. border-top-color: rgba(0, 0, 0, 0.2);
  161. border-bottom: 0;
  162. }
  163. [class*="datetimepicker-dropdown-top"]:after {
  164. content: '';
  165. display: inline-block;
  166. border-left: 6px solid transparent;
  167. border-right: 6px solid transparent;
  168. border-top: 6px solid #ffffff;
  169. border-bottom: 0;
  170. }
  171. .datetimepicker-dropdown-bottom-left {
  172. &:before {
  173. top: -7px;
  174. right: 6px;
  175. }
  176. &:after {
  177. top: -6px;
  178. right: 7px;
  179. }
  180. }
  181. .datetimepicker-dropdown-bottom-right {
  182. &:before {
  183. top: -7px;
  184. left: 6px;
  185. }
  186. &:after {
  187. top: -6px;
  188. left: 7px;
  189. }
  190. }
  191. .datetimepicker-dropdown-top-left {
  192. &:before {
  193. bottom: -7px;
  194. right: 6px;
  195. }
  196. &:after {
  197. bottom: -6px;
  198. right: 7px;
  199. }
  200. }
  201. .datetimepicker-dropdown-top-right {
  202. &:before {
  203. bottom: -7px;
  204. left: 6px;
  205. }
  206. &:after {
  207. bottom: -6px;
  208. left: 7px;
  209. }
  210. }
  211. .datetimepicker td,
  212. .datetimepicker th {
  213. text-align: center;
  214. width: 20px;
  215. height: 20px;
  216. -webkit-border-radius: 4px;
  217. -moz-border-radius: 4px;
  218. border-radius: 4px;
  219. border: none;
  220. }
  221. .table-striped .datetimepicker table tr td,
  222. .table-striped .datetimepicker table tr th {
  223. background-color: transparent;
  224. }
  225. .datetimepicker table tr td.old,
  226. .datetimepicker table tr td.new {
  227. color: #999999;
  228. }
  229. .datetimepicker table tr td.disabled,
  230. .datetimepicker table tr td.disabled:hover {
  231. background: none;
  232. color: #999999;
  233. cursor: default;
  234. }
  235. .datetimepicker table tr td.today,
  236. .datetimepicker table tr td.today:hover,
  237. .datetimepicker table tr td.today.disabled,
  238. .datetimepicker table tr td.today.disabled:hover {
  239. background-color: #fde19a;
  240. background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
  241. background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
  242. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a));
  243. background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
  244. background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
  245. background-image: linear-gradient(to bottom, #fdd49a, #fdf59a);
  246. background-repeat: repeat-x;
  247. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0);
  248. border-color: #fdf59a #fdf59a #fbed50;
  249. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  250. filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
  251. }
  252. .datetimepicker table tr td.today:hover,
  253. .datetimepicker table tr td.today:hover:hover,
  254. .datetimepicker table tr td.today.disabled:hover,
  255. .datetimepicker table tr td.today.disabled:hover:hover,
  256. .datetimepicker table tr td.today:active,
  257. .datetimepicker table tr td.today:hover:active,
  258. .datetimepicker table tr td.today.disabled:active,
  259. .datetimepicker table tr td.today.disabled:hover:active,
  260. .datetimepicker table tr td.today.active,
  261. .datetimepicker table tr td.today:hover.active,
  262. .datetimepicker table tr td.today.disabled.active,
  263. .datetimepicker table tr td.today.disabled:hover.active,
  264. .datetimepicker table tr td.today.disabled,
  265. .datetimepicker table tr td.today:hover.disabled,
  266. .datetimepicker table tr td.today.disabled.disabled,
  267. .datetimepicker table tr td.today.disabled:hover.disabled,
  268. .datetimepicker table tr td.today[disabled],
  269. .datetimepicker table tr td.today:hover[disabled],
  270. .datetimepicker table tr td.today.disabled[disabled],
  271. .datetimepicker table tr td.today.disabled:hover[disabled] {
  272. background-color: #fdf59a;
  273. }
  274. .datetimepicker table tr td.today:active,
  275. .datetimepicker table tr td.today:hover:active,
  276. .datetimepicker table tr td.today.disabled:active,
  277. .datetimepicker table tr td.today.disabled:hover:active,
  278. .datetimepicker table tr td.today.active,
  279. .datetimepicker table tr td.today:hover.active,
  280. .datetimepicker table tr td.today.disabled.active,
  281. .datetimepicker table tr td.today.disabled:hover.active {
  282. background-color: #fbf069 \9;
  283. }
  284. .datetimepicker table tr td.active,
  285. .datetimepicker table tr td.active:hover,
  286. .datetimepicker table tr td.active.disabled,
  287. .datetimepicker table tr td.active.disabled:hover {
  288. background-color: #006dcc;
  289. background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
  290. background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
  291. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
  292. background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
  293. background-image: -o-linear-gradient(top, #0088cc, #0044cc);
  294. background-image: linear-gradient(to bottom, #0088cc, #0044cc);
  295. background-repeat: repeat-x;
  296. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
  297. border-color: #0044cc #0044cc #002a80;
  298. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  299. filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
  300. color: #fff;
  301. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  302. }
  303. .datetimepicker table tr td.active:hover,
  304. .datetimepicker table tr td.active:hover:hover,
  305. .datetimepicker table tr td.active.disabled:hover,
  306. .datetimepicker table tr td.active.disabled:hover:hover,
  307. .datetimepicker table tr td.active:active,
  308. .datetimepicker table tr td.active:hover:active,
  309. .datetimepicker table tr td.active.disabled:active,
  310. .datetimepicker table tr td.active.disabled:hover:active,
  311. .datetimepicker table tr td.active.active,
  312. .datetimepicker table tr td.active:hover.active,
  313. .datetimepicker table tr td.active.disabled.active,
  314. .datetimepicker table tr td.active.disabled:hover.active,
  315. .datetimepicker table tr td.active.disabled,
  316. .datetimepicker table tr td.active:hover.disabled,
  317. .datetimepicker table tr td.active.disabled.disabled,
  318. .datetimepicker table tr td.active.disabled:hover.disabled,
  319. .datetimepicker table tr td.active[disabled],
  320. .datetimepicker table tr td.active:hover[disabled],
  321. .datetimepicker table tr td.active.disabled[disabled],
  322. .datetimepicker table tr td.active.disabled:hover[disabled] {
  323. background-color: #0044cc;
  324. }
  325. .datetimepicker table tr td.active:active,
  326. .datetimepicker table tr td.active:hover:active,
  327. .datetimepicker table tr td.active.disabled:active,
  328. .datetimepicker table tr td.active.disabled:hover:active,
  329. .datetimepicker table tr td.active.active,
  330. .datetimepicker table tr td.active:hover.active,
  331. .datetimepicker table tr td.active.disabled.active,
  332. .datetimepicker table tr td.active.disabled:hover.active {
  333. background-color: #003399 \9;
  334. }
  335. .datetimepicker .datetimepicker-hours table tr td span.hour_am,
  336. .datetimepicker .datetimepicker-hours table tr td span.hour_pm {
  337. width: 14.6%;
  338. }
  339. .datetimepicker .datetimepicker-hours fieldset legend,
  340. .datetimepicker .datetimepicker-minutes fieldset legend {
  341. margin-bottom: inherit;
  342. line-height: 30px;
  343. }
  344. .datetimepicker table tr td span.disabled,
  345. .datetimepicker table tr td span.disabled:hover {
  346. background: none;
  347. color: #999999;
  348. cursor: default;
  349. }
  350. .datetimepicker table tr td span.active,
  351. .datetimepicker table tr td span.active:hover,
  352. .datetimepicker table tr td span.active.disabled,
  353. .datetimepicker table tr td span.active.disabled:hover {
  354. background-color: #006dcc;
  355. background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
  356. background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
  357. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
  358. background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
  359. background-image: -o-linear-gradient(top, #0088cc, #0044cc);
  360. background-image: linear-gradient(to bottom, #0088cc, #0044cc);
  361. background-repeat: repeat-x;
  362. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
  363. border-color: #0044cc #0044cc #002a80;
  364. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  365. filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
  366. color: #fff;
  367. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  368. }
  369. .datetimepicker table tr td span.active:hover,
  370. .datetimepicker table tr td span.active:hover:hover,
  371. .datetimepicker table tr td span.active.disabled:hover,
  372. .datetimepicker table tr td span.active.disabled:hover:hover,
  373. .datetimepicker table tr td span.active:active,
  374. .datetimepicker table tr td span.active:hover:active,
  375. .datetimepicker table tr td span.active.disabled:active,
  376. .datetimepicker table tr td span.active.disabled:hover:active,
  377. .datetimepicker table tr td span.active.active,
  378. .datetimepicker table tr td span.active:hover.active,
  379. .datetimepicker table tr td span.active.disabled.active,
  380. .datetimepicker table tr td span.active.disabled:hover.active,
  381. .datetimepicker table tr td span.active.disabled,
  382. .datetimepicker table tr td span.active:hover.disabled,
  383. .datetimepicker table tr td span.active.disabled.disabled,
  384. .datetimepicker table tr td span.active.disabled:hover.disabled,
  385. .datetimepicker table tr td span.active[disabled],
  386. .datetimepicker table tr td span.active:hover[disabled],
  387. .datetimepicker table tr td span.active.disabled[disabled],
  388. .datetimepicker table tr td span.active.disabled:hover[disabled] {
  389. background-color: #0044cc;
  390. }
  391. .datetimepicker table tr td span.active:active,
  392. .datetimepicker table tr td span.active:hover:active,
  393. .datetimepicker table tr td span.active.disabled:active,
  394. .datetimepicker table tr td span.active.disabled:hover:active,
  395. .datetimepicker table tr td span.active.active,
  396. .datetimepicker table tr td span.active:hover.active,
  397. .datetimepicker table tr td span.active.disabled.active,
  398. .datetimepicker table tr td span.active.disabled:hover.active {
  399. background-color: #003399 \9;
  400. }
  401. .datetimepicker thead tr:first-child th,
  402. .datetimepicker tfoot tr:first-child th {
  403. cursor: pointer;
  404. }
  405. .datetimepicker thead tr:first-child th:hover,
  406. .datetimepicker tfoot tr:first-child th:hover {
  407. background: #eeeeee;
  408. }
  409. .input-append.date .add-on i,
  410. .input-prepend.date .add-on i,
  411. .input-group.date .input-group-addon span {
  412. cursor: pointer;
  413. width: 14px;
  414. height: 14px;
  415. }