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.

DatePicker date text is truncated when date text is Chinese

See original GitHub issue

DatePicker date text is truncated when date text is Chinese.

The date picker input field truncates the date text when language is Chinese (zh-cn & zh-TW).

Detailed description

In the screenshot below observe that the top <DatePickerInput> component, when it is not a child of <DatePicker>, shows the date text correctly.

At the bottom observe that the <DatePickerInput> shows the text cut off when it is a child of the <DatePicker>.

image

Is this a feature request (new component, new icon), a bug, or a general issue?

Bug

Is this issue related to a specific component?

<DatePicker>

What did you expect to happen? What happened instead? What would you like to see changed?

I expected the full date in the user’s language to be displayed.

What browser are you working in?

Chrome (72.0.3626.109)

What version of the Carbon Design System are you using?

carbon-components-react 6.74.2

CodeSandbox

Additional information

  • Screenshots or code
  • Notes

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
asudohcommented, Feb 25, 2019

@grommett The easiest way to find this out is going to http://react.carbondesignsystem.com/?selectedKind=DatePicker&selectedStory=single with calendar and opening up Chrome DevTools’ DOM inspector. In there you can find a style ruleset for something like .bx--date-picker.bx--date-picker--single .bx--date-picker__input. Hope this helps!

0reactions
stale[bot]commented, Jun 16, 2019

As there’s been no activity since this issue was marked as stale, we are auto-closing it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrap Datepicker cut off the bottom of screen
The quickest way to fix this is to apply a bottom-margin to the datepicker element or a bottom-padding to its parent (since it's...
Read more >
Wrong locale display text of DateP… | Apple Developer Forums
the reproduce code is very simple, just drag a DatePicker and set locale to another one(not default or en, zh-CN here), you will...
Read more >
datepicker shows truncated month - MSDN - Microsoft
If I put the text "Select a date" into the TextBlock it is truncated. You have a width defined so that is truncating...
Read more >
Datepicker documentation for Javascript | Mobiscroll
Name Type Default value anchor HTMLElement undefined animation String, Boolean undefined buttons Array
Read more >
How to Design a Perfect Date Picker? - UX World
At first place, provide a help text inside Date input control that guides the user about required format of date input. Next is...
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