_datepicker.scss 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. /* Modal */
  2. .datepicker-modal {
  3. max-width: 325px;
  4. min-width: 300px;
  5. max-height: none;
  6. }
  7. .datepicker-container.modal-content {
  8. display: flex;
  9. flex-direction: column;
  10. padding: 0;
  11. }
  12. .datepicker-controls {
  13. display: flex;
  14. justify-content: space-between;
  15. width: 280px;
  16. margin: 0 auto;
  17. .selects-container {
  18. display: flex;
  19. }
  20. .select-wrapper {
  21. input {
  22. &:focus {
  23. border-bottom: none;
  24. }
  25. border-bottom: none;
  26. text-align: center;
  27. margin: 0;
  28. }
  29. .caret {
  30. display: none;
  31. }
  32. }
  33. .select-year input {
  34. width: 50px;
  35. }
  36. .select-month input {
  37. width: 70px;
  38. }
  39. }
  40. .month-prev, .month-next {
  41. margin-top: 4px;
  42. cursor: pointer;
  43. background-color: transparent;
  44. border: none;
  45. }
  46. /* Date Display */
  47. .datepicker-date-display {
  48. flex: 1 auto;
  49. background-color: $secondary-color;
  50. color: #fff;
  51. padding: 20px 22px;
  52. font-weight: 500;
  53. .year-text {
  54. display: block;
  55. font-size: 1.5rem;
  56. line-height: 25px;
  57. color: $datepicker-year;
  58. }
  59. .date-text {
  60. display: block;
  61. font-size: 2.8rem;
  62. line-height: 47px;
  63. font-weight: 500;
  64. }
  65. }
  66. /* Calendar */
  67. .datepicker-calendar-container {
  68. flex: 2.5 auto;
  69. }
  70. .datepicker-table {
  71. width: 280px;
  72. font-size: 1rem;
  73. margin: 0 auto;
  74. thead {
  75. border-bottom: none;
  76. }
  77. th {
  78. padding: 10px 5px;
  79. text-align: center;
  80. }
  81. tr {
  82. border: none;
  83. }
  84. abbr {
  85. text-decoration: none;
  86. color: $datepicker-calendar-header-color;
  87. }
  88. td {
  89. &.is-today {
  90. color: $secondary-color;
  91. }
  92. &.is-selected {
  93. background-color: $secondary-color;
  94. color: #fff;
  95. }
  96. &.is-outside-current-month,
  97. &.is-disabled {
  98. color: $datepicker-disabled-day-color;
  99. pointer-events: none;
  100. }
  101. border-radius: 50%;
  102. padding: 0;
  103. }
  104. }
  105. .datepicker-day-button {
  106. &:focus {
  107. background-color: $datepicker-day-focus;
  108. }
  109. background-color: transparent;
  110. border: none;
  111. line-height: 38px;
  112. display: block;
  113. width: 100%;
  114. border-radius: 50%;
  115. padding: 0 5px;
  116. cursor: pointer;
  117. color: inherit;
  118. }
  119. /* Footer */
  120. .datepicker-footer {
  121. width: 280px;
  122. margin: 0 auto;
  123. padding-bottom: 5px;
  124. display: flex;
  125. justify-content: space-between;
  126. }
  127. .datepicker-cancel,
  128. .datepicker-clear,
  129. .datepicker-today,
  130. .datepicker-done {
  131. color: $secondary-color;
  132. padding: 0 1rem;
  133. }
  134. .datepicker-clear {
  135. color: $error-color;
  136. }
  137. /* Media Queries */
  138. @media #{$medium-and-up} {
  139. .datepicker-modal {
  140. max-width: 625px;
  141. }
  142. .datepicker-container.modal-content {
  143. flex-direction: row;
  144. }
  145. .datepicker-date-display {
  146. flex: 0 1 270px;
  147. }
  148. .datepicker-controls,
  149. .datepicker-table,
  150. .datepicker-footer {
  151. width: 320px;
  152. }
  153. .datepicker-day-button {
  154. line-height: 44px;
  155. }
  156. }