This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Commit 1330cb0 1 parent 582d94c commit 1330cb0 Copy full SHA for 1330cb0
File tree 2 files changed +24
-1
lines changed
src/components/datepicker
2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ $md-calendar-weeks-to-show: 7 !default;
8
8
$md-calendar-month-label-padding : 8px !default ;
9
9
$md-calendar-month-label-font-size : 13px !default ;
10
10
11
+ $md-calendar-scroll-cue-shadow-radius : 6px ;
12
+
11
13
$md-calendar-width : (7 * $md-calendar-cell-size ) + (2 * $md-calendar-side-padding );
12
14
$md-calendar-height :
13
15
($md-calendar-weeks-to-show * $md-calendar-cell-size ) + $md-calendar-header-height ;
@@ -79,9 +81,16 @@ md-calendar {
79
81
80
82
// Contains the scrolling element (this is the md-virtual-repeat-container).
81
83
.md-calendar-scroll-container {
84
+ // Add an inset shadow to help cue users that the calendar is scrollable. Use a negative x
85
+ // offset to push the vertical edge shadow off to the right so that it's cut off by the edge
86
+ // of the calendar container.
87
+ box-shadow : inset -3px 3px $md-calendar-scroll-cue-shadow-radius rgba (black , 0.2 );
88
+
82
89
display : inline-block ;
83
90
height : $md-calendar-weeks-to-show * $md-calendar-cell-size ;
84
- width : $md-calendar-width ;
91
+
92
+ // Add the shadow radius to the width so that the shadow os pushed off to the side and cut off.
93
+ width : $md-calendar-width + $md-calendar-scroll-cue-shadow-radius ;
85
94
}
86
95
87
96
// A single date cell in the calendar table.
Original file line number Diff line number Diff line change @@ -163,3 +163,17 @@ md-datepicker[disabled] {
163
163
display : none ;
164
164
}
165
165
}
166
+
167
+ // Animate the calendar inside of the floating calendar pane such that it appears to "scroll" into
168
+ // view while the pane is opening. This is done as a cue to users that the calendar is scrollable.
169
+ .md-datepicker-calendar-pane {
170
+ .md-calendar {
171
+ transform : translateY (150px );
172
+ transition : transform 0.4s $swift-ease-out-timing-function ;
173
+ transition-delay : 0.1s ;
174
+ }
175
+
176
+ & .md-pane-open .md-calendar {
177
+ transform : translateY (0 );
178
+ }
179
+ }
You can’t perform that action at this time.
0 commit comments