Skip to content

Commit

Permalink
fix(kit): fix calendar range presets filtration
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladyslav Bondar committed Nov 18, 2024
1 parent 2a00cc7 commit ff5822e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ export class TuiCalendarRange implements OnInit, OnChanges {
...items.filter(
(item) =>
(minLength === null ||
item.range.from.append(minLength).daySameOrBefore(item.range.to)) &&
item.range.from
.append(minLength)
.append({day: -1})
.daySameOrBefore(item.range.to)) &&
(min === null || item.range.to.daySameOrAfter(min)) &&
(max === null || item.range.from.daySameOrBefore(max)),
),
Expand Down

0 comments on commit ff5822e

Please sign in to comment.