_bootstrap-datetimepicker.scss 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. /*!
  2. * Datetimepicker for Bootstrap 3
  3. * ! version : 4.7.14
  4. * https://github.com/Eonasdan/bootstrap-datetimepicker/
  5. */
  6. $bs-datetimepicker-timepicker-font-size: 1.2em !default;
  7. $bs-datetimepicker-active-bg: $primary !default;
  8. $bs-datetimepicker-active-color: $white !default;
  9. $bs-datetimepicker-border-radius: $border-radius !default;
  10. $bs-datetimepicker-btn-hover-bg: $gray-200 !default;
  11. $bs-datetimepicker-disabled-color: $gray-800 !default;
  12. $bs-datetimepicker-alternate-color: $gray-800 !default;
  13. $bs-datetimepicker-secondary-border-color: #ccc !default;
  14. $bs-datetimepicker-secondary-border-color-rgba: rgba(0, 0, 0, 0.2) !default;
  15. $bs-datetimepicker-primary-border-color: white !default;
  16. $bs-datetimepicker-text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25) !default;
  17. .bootstrap-datetimepicker-widget {
  18. list-style: none;
  19. &.dropdown-menu {
  20. margin: 2px 0;
  21. padding: 4px;
  22. width: 19em;
  23. &.timepicker-sbs {
  24. // @media (min-width: $screen-sm-min) {
  25. @include media-breakpoint-down(sm) {
  26. width: 38em;
  27. }
  28. // @media (min-width: $screen-md-min)
  29. @include media-breakpoint-down(md){
  30. width: 38em;
  31. }
  32. // @media (min-width: $screen-lg-min)
  33. @include media-breakpoint-down(lg) {
  34. width: 38em;
  35. }
  36. }
  37. &:before, &:after {
  38. content: '';
  39. display: inline-block;
  40. position: absolute;
  41. }
  42. &.bottom {
  43. &:before {
  44. border-left: 7px solid transparent;
  45. border-right: 7px solid transparent;
  46. border-bottom: 7px solid $bs-datetimepicker-secondary-border-color;
  47. border-bottom-color: $bs-datetimepicker-secondary-border-color-rgba;
  48. top: -7px;
  49. left: 7px;
  50. }
  51. &:after {
  52. border-left: 6px solid transparent;
  53. border-right: 6px solid transparent;
  54. border-bottom: 6px solid $bs-datetimepicker-primary-border-color;
  55. top: -6px;
  56. left: 8px;
  57. }
  58. }
  59. &.top {
  60. &:before {
  61. border-left: 7px solid transparent;
  62. border-right: 7px solid transparent;
  63. border-top: 7px solid $bs-datetimepicker-secondary-border-color;
  64. border-top-color: $bs-datetimepicker-secondary-border-color-rgba;
  65. bottom: -7px;
  66. left: 6px;
  67. }
  68. &:after {
  69. border-left: 6px solid transparent;
  70. border-right: 6px solid transparent;
  71. border-top: 6px solid $bs-datetimepicker-primary-border-color;
  72. bottom: -6px;
  73. left: 7px;
  74. }
  75. }
  76. &.float-right {
  77. &:before {
  78. left: auto;
  79. right: 6px;
  80. }
  81. &:after {
  82. left: auto;
  83. right: 7px;
  84. }
  85. }
  86. }
  87. .list-unstyled {
  88. margin: 0;
  89. }
  90. a[data-action] {
  91. padding: 6px 0;
  92. }
  93. a[data-action]:active {
  94. box-shadow: none;
  95. }
  96. .timepicker-hour, .timepicker-minute, .timepicker-second {
  97. width: 54px;
  98. font-weight: bold;
  99. font-size: $bs-datetimepicker-timepicker-font-size;
  100. margin: 0;
  101. }
  102. button[data-action] {
  103. padding: 6px;
  104. }
  105. .btn[data-action="incrementHours"]::after {
  106. @extend .sr-only;
  107. content: "Increment Hours";
  108. }
  109. .btn[data-action="incrementMinutes"]::after {
  110. @extend .sr-only;
  111. content: "Increment Minutes";
  112. }
  113. .btn[data-action="decrementHours"]::after {
  114. @extend .sr-only;
  115. content: "Decrement Hours";
  116. }
  117. .btn[data-action="decrementMinutes"]::after {
  118. @extend .sr-only;
  119. content: "Decrement Minutes";
  120. }
  121. .btn[data-action="showHours"]::after {
  122. @extend .sr-only;
  123. content: "Show Hours";
  124. }
  125. .btn[data-action="showMinutes"]::after {
  126. @extend .sr-only;
  127. content: "Show Minutes";
  128. }
  129. .btn[data-action="togglePeriod"]::after {
  130. @extend .sr-only;
  131. content: "Toggle AM/PM";
  132. }
  133. .btn[data-action="clear"]::after {
  134. @extend .sr-only;
  135. content: "Clear the picker";
  136. }
  137. .btn[data-action="today"]::after {
  138. @extend .sr-only;
  139. content: "Set the date to today";
  140. }
  141. .picker-switch {
  142. text-align: center;
  143. &::after {
  144. @extend .sr-only;
  145. content: "Toggle Date and Time Screens";
  146. }
  147. td {
  148. padding: 0;
  149. margin: 0;
  150. height: auto;
  151. width: auto;
  152. line-height: inherit;
  153. span {
  154. line-height: 2.5;
  155. height: 2.5em;
  156. width: 100%;
  157. }
  158. }
  159. }
  160. table {
  161. width: 100%;
  162. margin: 0;
  163. & td,
  164. & th {
  165. text-align: center;
  166. border-radius: $bs-datetimepicker-border-radius;
  167. }
  168. & th {
  169. height: 20px;
  170. line-height: 20px;
  171. width: 20px;
  172. &.picker-switch {
  173. width: 145px;
  174. }
  175. &.disabled,
  176. &.disabled:hover {
  177. background: none;
  178. color: $bs-datetimepicker-disabled-color;
  179. cursor: not-allowed;
  180. }
  181. &.prev::after {
  182. @extend .sr-only;
  183. content: "Previous Month";
  184. }
  185. &.next::after {
  186. @extend .sr-only;
  187. content: "Next Month";
  188. }
  189. }
  190. & thead tr:first-child th {
  191. cursor: pointer;
  192. &:hover {
  193. background: $bs-datetimepicker-btn-hover-bg;
  194. }
  195. }
  196. & td {
  197. height: 54px;
  198. line-height: 54px;
  199. width: 54px;
  200. &.cw {
  201. font-size: .8em;
  202. height: 20px;
  203. line-height: 20px;
  204. color: $bs-datetimepicker-alternate-color;
  205. }
  206. &.day {
  207. height: 20px;
  208. line-height: 20px;
  209. width: 20px;
  210. }
  211. &.day:hover,
  212. &.hour:hover,
  213. &.minute:hover,
  214. &.second:hover {
  215. background: $bs-datetimepicker-btn-hover-bg;
  216. cursor: pointer;
  217. }
  218. &.old,
  219. &.new {
  220. color: $bs-datetimepicker-alternate-color;
  221. }
  222. &.today {
  223. position: relative;
  224. &:before {
  225. content: '';
  226. display: inline-block;
  227. border: 0 0 7px 7px solid transparent;
  228. border-bottom-color: $bs-datetimepicker-active-bg;
  229. border-top-color: $bs-datetimepicker-secondary-border-color-rgba;
  230. position: absolute;
  231. bottom: 4px;
  232. right: 4px;
  233. }
  234. }
  235. &.active,
  236. &.active:hover {
  237. background-color: $bs-datetimepicker-active-bg;
  238. color: $bs-datetimepicker-active-color;
  239. text-shadow: $bs-datetimepicker-text-shadow;
  240. }
  241. &.active.today:before {
  242. border-bottom-color: #fff;
  243. }
  244. &.disabled,
  245. &.disabled:hover {
  246. background: none;
  247. color: $bs-datetimepicker-disabled-color;
  248. cursor: not-allowed;
  249. }
  250. span {
  251. display: inline-block;
  252. width: 54px;
  253. height: 54px;
  254. line-height: 54px;
  255. margin: 2px 1.5px;
  256. cursor: pointer;
  257. border-radius: $bs-datetimepicker-border-radius;
  258. &:hover {
  259. background: $bs-datetimepicker-btn-hover-bg;
  260. }
  261. &.active {
  262. background-color: $bs-datetimepicker-active-bg;
  263. color: $bs-datetimepicker-active-color;
  264. text-shadow: $bs-datetimepicker-text-shadow;
  265. }
  266. &.old {
  267. color: $bs-datetimepicker-alternate-color;
  268. }
  269. &.disabled,
  270. &.disabled:hover {
  271. background: none;
  272. color: $bs-datetimepicker-disabled-color;
  273. cursor: not-allowed;
  274. }
  275. }
  276. }
  277. }
  278. &.usetwentyfour {
  279. td.hour {
  280. height: 27px;
  281. line-height: 27px;
  282. }
  283. }
  284. }
  285. .input-group.date {
  286. & .input-group-addon {
  287. cursor: pointer;
  288. }
  289. }