Skip to content

Commit b63f47b

Browse files
committed
docs(DatePicker): clarify onVisibleMonthChange also fires on date selection
Addresses review feedback that the JSDoc only mentioned calendar navigation (next/prev month/year/decade), but the callback also fires when a user selects a date in a different month.
1 parent 8bf21a8 commit b63f47b

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • packages/blade/src/components/DatePicker

packages/blade/src/components/DatePicker/types.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,10 @@ type CalendarProps<SelectionType extends DateSelectionType> = Pick<
8282
*/
8383
defaultVisibleMonth?: Date;
8484
/**
85-
* Callback which fires when the rendered month changes via calendar navigation
86-
* (next/previous month, year, or decade). Does not fire when the `visibleMonth`
87-
* prop is updated externally by the consumer.
85+
* Callback which fires when the rendered month changes, either via calendar
86+
* navigation (next/previous month, year, or decade) or when a date in a
87+
* different month is selected. Does not fire when the `visibleMonth` prop
88+
* is updated externally by the consumer.
8889
*/
8990
onVisibleMonthChange?: (date: Date) => void;
9091

0 commit comments

Comments
 (0)