File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 36
36
this . element = $ ( element ) ;
37
37
this . language = options . language || this . element . data ( 'date-language' ) || "en" ;
38
38
this . language = this . language in dates ? this . language : "en" ;
39
+ this . isRTL = dates [ this . language ] . rtl || false ;
39
40
this . format = DPGlobal . parseFormat ( options . format || this . element . data ( 'date-format' ) || 'mm/dd/yyyy' ) ;
40
41
this . isInline = false ;
41
42
this . isInput = this . element . is ( 'input' ) ;
66
67
} else {
67
68
this . picker . addClass ( 'datepicker-dropdown dropdown-menu' ) ;
68
69
}
70
+ if ( this . isRTL ) {
71
+ this . picker . addClass ( 'datepicker-rtl' ) ;
72
+ this . picker . find ( '.prev i, .next i' )
73
+ . toggleClass ( 'icon-arrow-left icon-arrow-right' ) ;
74
+ }
69
75
$ ( document ) . on ( 'mousedown' , function ( e ) {
70
76
// Clicked outside the datepicker, hide it
71
77
if ( $ ( e . target ) . closest ( '.datepicker' ) . length === 0 ) {
Original file line number Diff line number Diff line change 15
15
&-inline {
16
16
width : 220px ;
17
17
}
18
+ direction : ltr ;
19
+ &-rtl {
20
+ direction : rtl ;
21
+ }
18
22
&-dropdown {
19
23
top : 0 ;
20
24
left : 0 ;
You can’t perform that action at this time.
0 commit comments