vmware-clarity/ng-clarity

The Date Picker value is removed when the form is submitted on mobile.

vzdendyak opened this issue · 1 comments

The Date Picker value is removed when the form is submitted on mobile.

There is a visual issue with a date picker component when using a mobile browser. The value is removed once the form is submitted.
I have an assumption that it's caused by the different input formats on mobile & web browsers.

How to reproduce

Here is an example. Try to set a value and then click the 'Next' button which submits the form.
https://stackblitz.com/edit/clarity-light-theme-clr15-whdbap?file=src%2Fapp%2Fapp.component.ts

Steps to reproduce the behavior:

  1. Open the page using the mobile device or the Chrome Dev Tools and device toolbar.
  2. Set the value into the date input using a native datepicker
  3. Check that the form value is being set (I added the form.value in JSON format below the button)
  4. Click the "Next" button
  5. Check that the input value is being removed
    chrome_LpVtWakHq3

Expected behavior

The value should not be visually removed from the input

Versions

Clarity version:

  • v15.x

Framework version:
Angular 15

Device:

  • Type: [e.g. Mobile]
  • OS: [e.g. iOS / Android]
  • Browser [e.g. chrome, safari]

Additional notes

I noticed that this issue happens only using a native date input control. (when the calendar icon has a gray color). Please give any feedback on whether i'm doing something wrong.

@vzdendyak Hello, is this still reproducible -- I tested the Stackblitz provided and it seems that it's not happening

f05fdb90-9beb-4811-93c8-2836e4ae7745.mp4