Skip to content

Conversation

@Zedwag
Copy link
Contributor

@Zedwag Zedwag commented Aug 11, 2025

No description provided.

@Zedwag Zedwag self-assigned this Aug 11, 2025
@Zedwag Zedwag added the 25_2 label Aug 11, 2025
@Zedwag Zedwag requested review from a team as code owners August 11, 2025 00:28
const localizedWidgetName = this._getLocalizedWidgetName();
// @ts-expect-error ts-error
const [startDate, endDate] = value;
const [startDate, endDate] = value as [Date | undefined, Date | undefined];
Copy link
Contributor

Choose a reason for hiding this comment

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

dateLike[]?
Maybe we can even extract a new type like DateRange? Because I see you use this custom type in several places.
I remember I've tried to do it in .d.ts some time ago but didin't manage to do this because IT does not support ts tuples. But maybe we can use it for the code at least

Copy link
Contributor Author

@Zedwag Zedwag Aug 12, 2025

Choose a reason for hiding this comment

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

it's more like local hack here, tbh i think we can even remove undefined, updated the pr. I don't think we should extract a separate type, since it's only actual in couple place

dateLike[]?

no, in views we don't use dateLike type, since value is already converted from string or number when it passed to Views

}

_getDaysInRange(startDate, endDate) {
_getDaysInRange(startDate: Date | null, endDate: Date | null): Date[] {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we get return type from calendar?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nah, don't think we should, it's more like local for range selection

@Zedwag Zedwag merged commit 6005ab1 into DevExpress:25_2 Aug 14, 2025
528 of 536 checks passed
Zedwag added a commit to Zedwag/DevExtreme that referenced this pull request Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants