Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't left allign. Tried everything. #858

Open
sirusbaladi opened this issue Feb 9, 2024 · 5 comments
Open

can't left allign. Tried everything. #858

sirusbaladi opened this issue Feb 9, 2024 · 5 comments

Comments

@sirusbaladi
Copy link

Hi All, I've been stuck on this for far too long and I've done way more complicated UIs, but can't figure this one out, so asking the help from the community!

As you can see from the video, the datetimepicker ( https://github.com/react-native-datetimepicker/datetimepicker) changes size depending on the date selected. I tried my best, limiting max width, min width, width or wrapping it in a view and so on.

What I'm tried to achive is to have the picker left alignment fixed. If it want's to expand it can be on the right side. I don't get why i can't do this. Another acceptable solution would be to fix the width so that it can neither expand or shrink so that I can the allign it with other elements.

Any help?

WhatsApp.Video.2024-02-09.at.2.41.13.PM.mp4
image
@raulsanchez1024
Copy link

Did you find a solution? I am also facing the same issue

@trojanyao
Copy link

I encountered the same issue. My solution is to place the component on the right side with its parent justifyContent: 'space-between'.

@Zagorodnyi
Copy link

Same issue. I don't understand why the component expands itself to the left while the default approach should be to expand to the right. This small gap on the left drives me crazy.
Screenshot 2024-09-06 at 5 19 02 PM

@podame-forhims
Copy link

podame-forhims commented Sep 16, 2024

Same issue. I don't understand why the component expands itself to the left while the default approach should be to expand to the right. This small gap on the left drives me crazy.
Screenshot 2024-09-06 at 5 19 02 PM

@Zagorodnyi Did you happen to find a fix for this issue?

@reidkersey
Copy link

The gap is exactly 10px, so putting a style on RNDateTimePicker of {{margin: -10}} gets rid of it. Quite annoying that it has to be hard coded though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants