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

Fix .form-control padding for date/time inputs #37313

Closed
3 tasks done
WinterSilence opened this issue Oct 13, 2022 · 2 comments · Fixed by #37350
Closed
3 tasks done

Fix .form-control padding for date/time inputs #37313

WinterSilence opened this issue Oct 13, 2022 · 2 comments · Fixed by #37350
Labels

Comments

@WinterSilence
Copy link
Contributor

WinterSilence commented Oct 13, 2022

Prerequisites

Describe the issue

Some browsers (for example, FF and Chrome) add extra "padding" to date/time inputs when calculate area of visible text. As result, part of text is hide:

изображение

Need fix padding-right:

[type="date"].form-control,
[type="time"].form-control,
[type="datetime"].form-control,
[type="datetime-local"].form-control {
    padding-right: ...;
}

+ same fixes for .form-control-sm and .form-control-lg

Reduced test cases

[type="date"].form-control {
    width: 8rem;
}
[type="date"].form-control-sm {
    width: 7rem;
}
[type="time"].form-control {
    width: 5rem;
}
[type="time"].form-control-sm {
    width: 4.5rem;
}
[type="datetime"].form-control,
[type="datetime-local"].form-control {
    width: 11.5rem;
}
[type="datetime"].form-control-sm,
[type="datetime-local"].form-control-sm {
    width: 10.5rem;
}
<input type="datetime-local" name="from" class="form-control" value="2022-12-28 13:30">
<input type="time" name="to" class="form-control" value="13:30">
<input type="datetime-local" name="from" class="form-control form-control-sm" value="2022-12-28 13:30">
<input type="time" name="to" class="form-control form-control-sm" value="13:30">
<input type="datetime-local" name="from" class="form-control form-control-lg" value="2022-12-28 13:30">
<input type="time" name="to" class="form-control form-control-lg" value="13:30">

What operating system(s) are you seeing the problem on?

Windows, macOS, Android, iOS, Linux

What browser(s) are you seeing the problem on?

Chrome, Firefox

What version of Bootstrap are you using?

v.5.*

@divyasakre
Copy link

Hi! I am new to the open source, I want to contribute and fix this frontend issue.

take

@Hamzaansari15
Copy link

Hi! I am new to the open source, I want to contribute and fix this frontend issue.

@mdo mdo added this to v5.3.0 Oct 30, 2022
@mdo mdo moved this to To do in v5.3.0 Oct 30, 2022
Repository owner moved this from To do to Done in v5.3.0 Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants