Skip to content

Releases: knightburton/react-interval-calendar

v3.1.0

23 Jan 21:35
Compare
Choose a tag to compare

You can now override each and every slotProps type. With this you can pass custom properties into each slotProps with a simple module augmentation.
This will allow you to have custom properties that is available both on slotProps definition and component prop as well.

Most of the component props are available to override.
Look for exported interfaces with the name of the component that you want to augment and Overrides suffix.

Define your custom types like the following:

declare module '@knightburton/react-interval-calendar' {
  interface ContainerPropsOverrides {
    something?: boolean;
  }
}

// In your component, you can define the value like the this
<IntervalCalendar
  weekStartsOn={1}
  start={new Date(2021, 1, 1)}
  end={new Date(2021, 6, 31)}
  slotProps={{ root: { something: true } }}
/>

// Also, this will be available on component props as well
const Root = ({ children, something }: ContainerProps): JSX.Element => <></>;

The list of overridable component props:
ContainerPropsOverrides, HeaderPropsOverrides, HeaderCellPropsOverrides, HeaderCellContentPropsOverrides, BodyPropsOverrides, BodyRowPropsOverrides, BodyCellPropsOverrides, BodyCellContentPropsOverrides and EmptyPropsOverrides

v3.0.1

16 Oct 19:23
Compare
Choose a tag to compare

2023-10-16

FIXES

  • Change the BodyCell component onClick property from mandatory to optional

v3.0.0

16 Oct 12:53
Compare
Choose a tag to compare

2023-10-16

BREAKING CHANGES

  • The component props moved into the slots prop
  • The className props moved into the slotProps prop alongside with the component other props
    (all the usual HTML Element props are available now)
  • The height prop moved into the slotProps.root prop style prop
  • The showHeader prop moved into the slotProps.header prop as enabled
  • The emptyLabel prop moved into the slotProps.empty prop as label
  • The onCellClick prop moved into the slotProps.bodyCell prop as onClick and the arguments list changed to
    (event: React.MouseEvent<HTMLLIElement>, data: BodyCellData) => void

For further details check the Prop-Types and the Migration Guides.

v2.1.0

18 Apr 18:56
Compare
Choose a tag to compare

New Feature

The Calendar now can start render the weeks on the current (the browser Date) week. All the previous week - if there any - will be skipped for the initial render. To enable this feature, just pass startRenderOnCurrentWeek prop to the Calendar.

v2.0.1

24 Jan 19:01
Compare
Choose a tag to compare

Fix: Resolve the BodyCell onClick handler auto call on render.

v2.0.0

20 Jan 16:48
Compare
Choose a tag to compare

BREAKING CHANGE
The Interval Calendar implementation has completely changed.
Now it is much more close to a headless solution.
We dropped the theme solution and all the highlight related markings.
Now it gives the possibility to replace a lot of internal component with custom ones, alongside with the simplified classnames.

For the full prop changes please check the README.md file.

v1.0.2

06 Sep 10:16
Compare
Choose a tag to compare

Fix the getTimestamp date util param check.

v1.0.1

15 Jun 20:46
Compare
Choose a tag to compare
1.0.1

v1.0.0

04 Jun 18:21
Compare
Choose a tag to compare
Update the example application