File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -273,6 +273,10 @@ md-dialog.dtp {
273
273
background : # eee ;
274
274
}
275
275
276
+ html [dir = "rtl" ] .dtp div .dtp-picker-clock {
277
+ direction : ltr;
278
+ }
279
+
276
280
.dtp-clock-center {
277
281
width : 15px ;
278
282
height : 15px ;
Original file line number Diff line number Diff line change @@ -30,9 +30,9 @@ <h1>Angular Material DatePicker</h1>
30
30
< md-card layout ="column ">
31
31
< md-toolbar class ="md-primary ">
32
32
< div class ="md-toolbar-tools ">
33
- < h2 >
34
- < span > Datetime Pickers </ span >
35
- </ h2 >
33
+ < h2 > Datetime Pickers </ h2 >
34
+ < div flex > </ div >
35
+ < md-button class =" md-raised " ng-click =" changeDir() " > {{txtdir}} </ md-button >
36
36
</ div >
37
37
</ md-toolbar >
38
38
< md-card-content class ="md-padding ">
52
52
53
53
< div layout-gt-md ="row " layout ="column " layout-align-gt-md ="center center ">
54
54
< md-input-container flex-gt-md ="30 ">
55
- < label > Timepicker Only ( 12-hour) </ label >
55
+ < label > Timepicker Only | 12-hour</ label >
56
56
< input mdc-datetime-picker date ="false " time ="true " type ="text " id ="time " short-time ="true "
57
57
placeholder ="Time "
58
58
min-date ="minDate "
63
63
</ div >
64
64
< div layout-gt-md ="row " layout ="column " layout-align-gt-md ="center center ">
65
65
< md-input-container flex-gt-md ="30 ">
66
- < label > Timepicker Only ( 24-hour) </ label >
66
+ < label > Timepicker Only | 24-hour</ label >
67
67
< input mdc-datetime-picker date ="false " time ="true " type ="text " id ="time2 "
68
68
placeholder ="Time "
69
69
min-date ="minDate "
Original file line number Diff line number Diff line change 27
27
} ) ;
28
28
} ;
29
29
30
+ // Set and change the text direction
31
+ $scope . txtdir = document . documentElement . dir || 'ltr' ;
32
+ $scope . changeDir = function ( ) {
33
+ $scope . txtdir = document . documentElement . dir = ( $scope . txtdir === 'rtl' ) ? 'ltr' : 'rtl' ;
34
+ } ;
35
+
30
36
} )
31
37
32
38
. directive ( 'exSourceCode' , function ( ) {
You can’t perform that action at this time.
0 commit comments