@@ -14,8 +14,10 @@ $md-datepicker-non-touch-calendar-height: 354px;
14
14
// the calendar grows, since some of the elements have pixel-based sizes. These numbers have been
15
15
// chosen to minimize extra whitespace at larger sizes, while still ensuring we won't need
16
16
// scrollbars at smaller sizes.
17
- $md-datepicker-touch-width : 64vmin ;
18
- $md-datepicker-touch-height : 80vmin ;
17
+ $md-datepicker-touch-landscape-width : 64vh ;
18
+ $md-datepicker-touch-landscape-height : 80vh ;
19
+ $md-datepicker-touch-portrait-width : 80vw ;
20
+ $md-datepicker-touch-portrait-height : 100vw ;
19
21
$md-datepicker-touch-min-width : 250px ;
20
22
$md-datepicker-touch-min-height : 312px ;
21
23
$md-datepicker-touch-max-width : 750px ;
@@ -46,11 +48,23 @@ $md-datepicker-touch-max-height: 788px;
46
48
margin : -24px ;
47
49
48
50
.mat-calendar {
49
- width : $md-datepicker-touch-width ;
50
- height : $md-datepicker-touch-height ;
51
51
min-width : $md-datepicker-touch-min-width ;
52
52
min-height : $md-datepicker-touch-min-height ;
53
53
max-width : $md-datepicker-touch-max-width ;
54
54
max-height : $md-datepicker-touch-max-height ;
55
55
}
56
56
}
57
+
58
+ @media all and (orientation : landscape ) {
59
+ .mat-datepicker-content-touch .mat-calendar {
60
+ width : $md-datepicker-touch-landscape-width ;
61
+ height : $md-datepicker-touch-landscape-height ;
62
+ }
63
+ }
64
+
65
+ @media all and (orientation : portrait ) {
66
+ .mat-datepicker-content-touch .mat-calendar {
67
+ width : $md-datepicker-touch-portrait-width ;
68
+ height : $md-datepicker-touch-portrait-height ;
69
+ }
70
+ }
0 commit comments