bootstrap-datetimepicker.less 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. /*!
  2. * Datetimepicker for Bootstrap v3
  3. * https://github.com/Eonasdan/bootstrap-datetimepicker/
  4. */
  5. .bootstrap-datetimepicker-widget {
  6. top: 0;
  7. left: 0;
  8. width: 250px;
  9. padding: 4px 8px;
  10. margin-top: 1px;
  11. z-index: 99999 !important;
  12. border-radius: 4px;
  13. &.timepicker-sbs {
  14. width: 600px;
  15. }
  16. & .dow {
  17. width: 14.2857%;
  18. }
  19. &.pull-right {
  20. &:before {
  21. left: auto;
  22. right: 6px;
  23. }
  24. &:after {
  25. left: auto;
  26. right: 7px;
  27. }
  28. }
  29. >ul {
  30. list-style-type: none;
  31. margin: 0;
  32. }
  33. a[data-action] {
  34. padding: 6px 0;
  35. }
  36. .timepicker-hour, .timepicker-minute, .timepicker-second {
  37. width: 54px;
  38. font-weight: bold;
  39. font-size: 1.2em;
  40. margin: 0;
  41. }
  42. button[data-action] {
  43. padding: 6px;
  44. }
  45. table[data-hour-format="12"] .separator {
  46. width: 4px;
  47. padding: 0;
  48. margin: 0;
  49. }
  50. .datepicker > div {
  51. display: none;
  52. }
  53. .picker-switch {
  54. text-align: center;
  55. }
  56. table {
  57. width: 100%;
  58. margin: 0;
  59. }
  60. td,
  61. th {
  62. text-align: center;
  63. border-radius: 4px;
  64. }
  65. td {
  66. height: 54px;
  67. line-height: 54px;
  68. width: 54px;
  69. &.day
  70. {
  71. height: 20px;
  72. line-height: 20px;
  73. width: 20px;
  74. }
  75. &.day:hover,
  76. &.hour:hover,
  77. &.minute:hover,
  78. &.second:hover {
  79. background: @gray-lighter;
  80. cursor: pointer;
  81. }
  82. &.old,
  83. &.new {
  84. color: @gray-light;
  85. }
  86. &.today {
  87. position: relative;
  88. &:before {
  89. content: '';
  90. display: inline-block;
  91. border-left: 7px solid transparent;
  92. border-bottom: 7px solid @btn-primary-bg;
  93. border-top-color: rgba(0, 0, 0, 0.2);
  94. position: absolute;
  95. bottom: 4px;
  96. right: 4px;
  97. }
  98. }
  99. &.active,
  100. &.active:hover {
  101. background-color: @btn-primary-bg;
  102. color: #fff;
  103. text-shadow: 0 -1px 0 rgba(0,0,0,.25);
  104. }
  105. &.active.today:before {
  106. border-bottom-color: #fff;
  107. }
  108. &.disabled,
  109. &.disabled:hover {
  110. background: none;
  111. color: @gray-light;
  112. cursor: not-allowed;
  113. }
  114. span {
  115. display: block;
  116. width: 54px;
  117. height: 54px;
  118. line-height: 54px;
  119. float: left;
  120. margin: 2px 1.5px;
  121. cursor: pointer;
  122. border-radius: 4px;
  123. &:hover {
  124. background: @gray-lighter;
  125. }
  126. &.active {
  127. background-color: @btn-primary-bg;
  128. color: #fff;
  129. text-shadow: 0 -1px 0 rgba(0,0,0,.25);
  130. }
  131. &.old {
  132. color: @gray-light;
  133. }
  134. &.disabled,
  135. &.disabled:hover {
  136. background: none;
  137. color: @gray-light;
  138. cursor: not-allowed;
  139. }
  140. }
  141. }
  142. th {
  143. height: 20px;
  144. line-height: 20px;
  145. width: 20px;
  146. &.switch {
  147. width: 145px;
  148. }
  149. &.next,
  150. &.prev {
  151. font-size: @font-size-base * 1.5;
  152. }
  153. &.disabled,
  154. &.disabled:hover {
  155. background: none;
  156. color: @gray-light;
  157. cursor: not-allowed;
  158. }
  159. }
  160. thead tr:first-child th {
  161. cursor: pointer;
  162. &:hover {
  163. background: @gray-lighter;
  164. }
  165. }
  166. }
  167. .input-group {
  168. &.date {
  169. .input-group-addon span {
  170. display: block;
  171. cursor: pointer;
  172. width: 16px;
  173. height: 16px;
  174. }
  175. }
  176. }
  177. .bootstrap-datetimepicker-widget.left-oriented {
  178. &:before {
  179. left: auto;
  180. right: 6px;
  181. }
  182. &:after {
  183. left: auto;
  184. right: 7px;
  185. }
  186. }
  187. .bootstrap-datetimepicker-widget ul.list-unstyled li div.timepicker div.timepicker-picker table.table-condensed tbody > tr > td {
  188. padding: 0px !important;
  189. }
  190. @media screen and (max-width: 767px) {
  191. .bootstrap-datetimepicker-widget.timepicker-sbs {
  192. width: 283px;
  193. }
  194. }