carbon-design-system / carbon-for-ibm-dotcom

Carbon for IBM.com is based on the Carbon Design System for IBM
https://www.ibm.com/standards/carbon/
Apache License 2.0
268 stars 156 forks source link

The Date Picker component behaves differently depending on where it is running. #9746

Open jccorralesIBM opened 1 year ago

jccorralesIBM commented 1 year ago

Description

I am having a problem where the date picker component behaves differently if it is used in the documentation storybook (https://web-components.carbondesignsystem.com/?path=/story/components-date-picker--single-with-calendar) the CodeSandBox (https://codesandbox.io/s/zen-brook-liqsyi?file=/index.html) or the project I am currently working on.

In the documentation, when I wrote in the value knob a specific date, the tag whose "value" property was updated was the <bx-date-picker> Tag. When I began working on a CodeSandBox example, writing the value in the <bx-date-picker> didn't set the value, but instead if I type it in the <bx-date-picker-input> tag, it will give me a completely random value in the date field UI, yet the HTML will have the correct date value.

And in my project, when I wrote the value in the <bx-date-picker> tag it didn't work, but it worked in the <bx-date-picker-input> correctly, displaying the correct date both in the UI and the HTML.

Talking with somebody involved in the carbon web components project, I was told that the value of <bx-date-picker> receives a javascript value. But the <bx-date-picker-input> tag's value receives an html attribute, which isn't easy to understand in the current documentation.

And well, regardless of the previous paragraph, I notice that the documentation doesn't properly explain all these behaviors that I see in the different environments.

Component(s) impacted

Date Picker, single with calendar.

Browser

Chrome

Carbon Web Components version

v1.21.0

Severity

Severity 2 = Aspects of design is broken, and impedes users in a significant way, but there is a way to complete their tasks. Affects major functionality, has a workaround.

Application/website

Legal Entity Repository

CodeSandbox example

https://codesandbox.io/s/zen-brook-liqsyi?file=/index.html

Steps to reproduce the issue (if applicable)

No response

Release date (if applicable)

No response

Code of Conduct

stale[bot] commented 1 year ago

We've marked this issue as stale because there hasn't been any activity for 60 days. If there's no further activity on this issue in the next three days then we'll close it. You can keep the conversation going with just a short comment. Thanks for your contributions.