react-calendar icon indicating copy to clipboard operation
react-calendar copied to clipboard

wrong inline style calculation with RTL layout

Open felixmosh opened this issue 4 years ago • 5 comments

Hi,

When the layout is based on RTL (right-to-left) & showNeighboringMonth={false} the calculation of margin of the first item is hard coded to left, this makes the calendar looks like:

image

instead of that it should be margin-right.

felixmosh avatar Jul 30 '19 09:07 felixmosh

I've found that with css grid it can be solved with css! https://zellwk.com/blog/calendar-with-css-grid/

felixmosh avatar Nov 10 '20 12:11 felixmosh

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.

github-actions[bot] avatar Jan 03 '22 00:01 github-actions[bot]

Any updates on this?

felixmosh avatar Jan 03 '22 05:01 felixmosh

I think we could use margin-block-start to fix this. But margin-left would need to stay for compatibility reasons, so margin-block-end would need to reset it.

wojtekmaj avatar Apr 10 '22 22:04 wojtekmaj

Why not css grid? 🙂

felixmosh avatar Apr 11 '22 04:04 felixmosh

Fixed via #841

wojtekmaj avatar Apr 19 '23 12:04 wojtekmaj