question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Date picker RTL support

See original GitHub issue

Bug, feature request, or proposal:

Bug

What is the expected behavior?

RTL support

image

What is the current behavior?

image

What is the use-case or motivation for changing an existing behavior?

It should look properly when dir="rtl" is set on the body element

Steps to reproduce

Add dir="rtl" to body element

<body dir="rtl"> </body>

Is there anything else we should know?

I was able to get the right look by adding dir="rtl" directly on the date picker element

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
crisbetocommented, Feb 17, 2018

Thanks, I see what you mean now. The issue comes from the fact that when Material opens an overlay (in your case a dialog and a datepicker), it defaults to the direction being ltr, unless you’ve passed in something different. I’ve submitted a PR that will default to the direction from the body, but until it gets released you can fix your issue by setting the direction explicitly in your dialog config:

dialog.open(DialogComponent, {
  direction: 'rtl'
  // some other dialog configuration...
});
0reactions
angular-automatic-lock-bot[bot]commented, Sep 8, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrap datepicker: RTL is not working - Stack Overflow
I solve this problem by adding those lines in the Site.css file: /*To display datepicker in RTL*/ .datepicker-dropdown { max-width: 300px; } ...
Read more >
jQuery DatePicker RTL Support - Demos - Telerik
This demo shows how to set the DatePicker RTL functionality by including the kendo.rtl.[min].css file and wrapping the DatePicker in a div element...
Read more >
app-datepicker-rtl - npm
Datepicker element built with lit-element and Material Design 2. This is a fork of app-datepicker by motts. Th fork adds RTL support, which...
Read more >
Javascript Calendar RTL mode Example - Mobiscroll
Javascript calendar with complete RTL support. Manual control and built-in right to left languages: Arabic, Hebrew, Farsi.
Read more >
1320880 - [DateTimePicker] Add RTL support to date picker
[DateTimePicker] Add RTL support to date picker · Categories · Tracking · People · References · Details · Crash Data · Security ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found