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

fix(DateField): error thrown when value is null and changing locale #1485

Conversation

zernonia
Copy link
Member

@zernonia zernonia commented Dec 6, 2024

No description provided.

@zernonia zernonia linked an issue Dec 6, 2024 that may be closed by this pull request
@zernonia zernonia merged commit f9b77f2 into main Dec 6, 2024
3 checks passed
placeholder.value = _modelValue.copy()
})

watch([modelValue, locale], ([_modelValue]) => {
if (_modelValue !== undefined) {
if (!isNullish(_modelValue)) {
segmentValues.value = { ...syncSegmentValues({ value: _modelValue, formatter }) }
}
else if (Object.values(segmentValues.value).every(value => value === null) || _modelValue === undefined) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zernonia, based on this PR, I think there is else if branch to be corrected too (including DateRangeFieldRoot.vue)

@sadeghbarati sadeghbarati deleted the 1478-bug-cannot-change-datepicker-locale-when-there-is-a-null-date branch December 11, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Cannot change datepicker locale when there is a null date
2 participants