logbon72 / angular-material-datetimepicker

Datepicker for Angular Material, mimick's Android's date time picker
https://logbon72.github.io/angular-material-datetimepicker
MIT License
169 stars 123 forks source link

problem with rtl website #91

Closed mohammadkhoeini closed 7 years ago

mohammadkhoeini commented 7 years ago

when web page default direction is rtl this problem comes up capture

i fix this with this css change .dtp div.dtp-picker-clock { margin: 10px 20px 0 20px; padding: 10px; border-radius: 50% !important; background: #eee; direction: ltr; // this one }

result: capture

thanks for your great work

hexadecy commented 7 years ago

@molikh Is it ok? Add to material-datetimepicker.css:

html[dir="rtl"] .dtp div.dtp-picker-clock {
    direction: ltr; 
}

Set in your app.js: document.documentElement.dir = "rtl" or <html dir="rtl">

mohammadkhoeini commented 7 years ago

@hexadecy no it's not. there is 3 way to specify direction. 1- use dir="rtl" on html ( your solution only fix this) 2- use dir="rtl" on body tag ( i use this ) 3- use css direction="rtl" ( can be used anywhere)

so your solution dosent fix problem in all kind of directions

ty for your response

hexadecy commented 7 years ago

Your fix was better.