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

Input date picker with range ignores valueAsDate parameter #5207

Closed
arjanvanzutphen opened this issue Aug 23, 2022 · 5 comments
Closed

Input date picker with range ignores valueAsDate parameter #5207

arjanvanzutphen opened this issue Aug 23, 2022 · 5 comments
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. bug Bug reports for broken functionality. Issues should include a reproduction of the bug.

Comments

@arjanvanzutphen
Copy link

Actual Behavior

InputDatePicker with the range parameter ignores the valueAsDate parameter value and the input element stays empty.
The single inputDatePicker honours the valueAsDate parameter with a pre filled date value in the input element
image

Expected Behavior

The inputDatePicker element with the range parameters should contain the pre filled values when passing the [new Date(), new Date()] array in the valueAsDate parameter

Reproduction Sample

https://codepen.io/arjan_esrinl/pen/JjLVKwV?editors=1001

Reproduction Steps

  1. Open the codepen: https://codepen.io/arjan_esrinl/pen/JjLVKwV?editors=1001
  2. Notice the missing values in the second inputDatePicker

Reproduction Version

1.0.0-beta.91

Relevant Info

Windows 11
Chrome 104.0.5112.81 (Official Build) (64-bit)
Firefox 95.0 (64-bit)

Regression?

No response

@arjanvanzutphen arjanvanzutphen added 0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels Aug 23, 2022
@jcfranco jcfranco added 1 - assigned Issues that are assigned to a sprint and a team member. and removed needs triage Planning workflow - pending design/dev review. 0 - new New issues that need assignment. labels Sep 6, 2022
@driskull
Copy link
Member

driskull commented Nov 9, 2022

As a workaround for now, an array of strings for value seems to work.

// inputDatePickerRangeElement.valueAsDate = [new Date(), new Date()];
   
inputDatePickerRangeElement.value = ["2022-11-09", "2022-11-20"];

@driskull
Copy link
Member

driskull commented Nov 9, 2022

@eriklharper can we prioritize this one for the next release?

@eriklharper
Copy link
Contributor

@eriklharper can we prioritize this one for the next release?

I have a fix ready to go, just writing some tests for it :) PR should be ready EOW.

@eriklharper eriklharper added 2 - in development Issues that are actively being worked on. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Nov 23, 2022
eriklharper added a commit that referenced this issue Nov 23, 2022
…inputs (#5758)

**Related Issue:** #5207 

## Summary

This PR fixes an issue where the input boxes are completely empty when
the `valueAsDate` property is directly changed with javascript when
using the `range` prop.

<!--

Please make sure the PR title and/or commit message adheres to the
https://www.conventionalcommits.org/en/v1.0.0/ specification.

Note: If your PR only has one commit and it is NOT semantic, you will
need to either

a. add another commit and wait for the check to update
b. proceed to squash merge, but make sure the commit message is the same
as the title.

This is because of the way GitHub handles single-commit squash merges
(see zeke/semantic-pull-requests#17)

If this is component-related, please verify that:

- [ ] feature or fix has a corresponding test
- [ ] changes have been tested with demo page in Edge

---

If this is skipping an unstable test:

- include info about the test failure
- submit an unstable-test issue by
[choosing](https://github.com/Esri/calcite-components/issues/new/choose)
the unstable test template and filling it out

-->

Co-authored-by: Erik Harper <eriklharper@pm.me>
@eriklharper eriklharper added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Nov 23, 2022
@github-actions github-actions bot assigned benelan and geospatialem and unassigned eriklharper Nov 23, 2022
@github-actions
Copy link
Contributor

Installed and assigned for verification.

@geospatialem geospatialem added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Nov 28, 2022
@geospatialem
Copy link
Member

Verified on next.642 ✔️

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. bug Bug reports for broken functionality. Issues should include a reproduction of the bug.
Projects
None yet
Development

No branches or pull requests

6 participants