-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(input-date-picker): ensure initial value is in range (#9894)
**Related Issue:** #9282 ## Summary Ensure the initial value is within the min/max range. This is in line with the existing behavior, but it is not ideal. The plan is to stop automatically changing the value to the min/max when it is out of range, and rely on form constraint validation instead. However, doing so would be a breaking change, so it's on hold until v3. ## Verification notes The behavior after this is installed will look the same as the [repro sample](https://codepen.io/benelan/pen/VwOGwZy). The key is to check the value of the component in the form submission callback: ```js form.onsubmit = (event) => { console.log(event.target.elements["date-picker"].value); ... } ``` Here is an [updated repro sample](https://codepen.io/benelan/pen/dyBNVMx?editors=1111).
- Loading branch information
1 parent
3a2039c
commit 7d05134
Showing
3 changed files
with
33 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters