@super-calendar/native 2.10.0 → 2.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,7 @@ import type { ReactElement } from "react";
2
2
  import { StyleSheet, Text, TouchableOpacity } from "react-native";
3
3
  import Animated, { useAnimatedStyle, useDerivedValue } from "react-native-reanimated";
4
4
  import { useCalendarTheme } from "../theme";
5
+ import { useCalendarLabels } from "../utils/labels";
5
6
  import type { RenderEventArgs } from "../types";
6
7
  import {
7
8
  eventAccessibilityLabel,
@@ -46,6 +47,7 @@ export function DefaultEvent<T>({
46
47
  onLongPress,
47
48
  }: RenderEventArgs<T>): ReactElement {
48
49
  const theme = useCalendarTheme();
50
+ const labels = useCalendarLabels();
49
51
  const isAllDayEvent = isAllDay ?? false;
50
52
  const timeLabel = eventTimeLabel({
51
53
  mode,
@@ -75,6 +77,7 @@ export function DefaultEvent<T>({
75
77
  end: event.end,
76
78
  ampm,
77
79
  allDayLabel,
80
+ labels,
78
81
  });
79
82
 
80
83
  // Month cells and the all-day lane get a single clipped line; the timed grid
@@ -1,6 +1,7 @@
1
1
  import type { ReactElement } from "react";
2
2
  import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
3
3
  import { useCalendarTheme } from "../theme";
4
+ import { useCalendarLabels } from "../utils/labels";
4
5
  import type { RenderEventArgs } from "../types";
5
6
  import {
6
7
  eventAccessibilityLabel,
@@ -30,6 +31,7 @@ export function DefaultMonthEvent<T>({
30
31
  onLongPress,
31
32
  }: RenderEventArgs<T>): ReactElement {
32
33
  const theme = useCalendarTheme();
34
+ const labels = useCalendarLabels();
33
35
  const isAllDayEvent = isAllDay ?? false;
34
36
  const timeLabel = eventTimeLabel({
35
37
  mode,
@@ -50,6 +52,7 @@ export function DefaultMonthEvent<T>({
50
52
  end: event.end,
51
53
  ampm,
52
54
  allDayLabel,
55
+ labels,
53
56
  });
54
57
 
55
58
  return (
@@ -36,6 +36,7 @@ import {
36
36
  type WeekdayFormat,
37
37
  isDateSelectable,
38
38
  } from "@super-calendar/core";
39
+ import type { CalendarLabels } from "@super-calendar/core";
39
40
  import { buildMonthWeeks, getWeekDays, weekdayFormatToken } from "@super-calendar/core";
40
41
  import { createSlots, type SlotStyleProps } from "../utils/slots";
41
42
  import { DefaultMonthEvent } from "./DefaultMonthEvent";
@@ -100,6 +101,8 @@ export type MonthListProps<T> = {
100
101
  locale?: Locale;
101
102
  sortedMonthView?: boolean;
102
103
  moreLabel?: string;
104
+ /** Translations for the screen-reader words and gutter text; omitted keys use English. */
105
+ labels?: Partial<CalendarLabels>;
103
106
  /** Show dimmed adjacent-month days. Default false (each month shows only its own days). */
104
107
  showAdjacentMonths?: boolean;
105
108
  /** Tint weekend day cells with the theme's weekend background. Default true. */
@@ -153,6 +156,7 @@ function MonthListInner<T>({
153
156
  locale,
154
157
  sortedMonthView,
155
158
  moreLabel,
159
+ labels,
156
160
  showAdjacentMonths = false,
157
161
  highlightWeekends = true,
158
162
  disableMonthEventCellPress,
@@ -466,6 +470,7 @@ function MonthListInner<T>({
466
470
  locale={locale}
467
471
  sortedMonthView={sortedMonthView}
468
472
  moreLabel={moreLabel}
473
+ labels={labels}
469
474
  showAdjacentMonths={showAdjacentMonths}
470
475
  highlightWeekends={highlightWeekends}
471
476
  disableMonthEventCellPress={disableMonthEventCellPress}
@@ -501,6 +506,7 @@ function MonthListInner<T>({
501
506
  weekStartsOn,
502
507
  sortedMonthView,
503
508
  moreLabel,
509
+ labels,
504
510
  showAdjacentMonths,
505
511
  disableMonthEventCellPress,
506
512
  isRTL,
@@ -34,6 +34,7 @@ import {
34
34
  getWeekDays,
35
35
  weekdayFormatToken,
36
36
  } from "@super-calendar/core";
37
+ import type { CalendarLabels } from "@super-calendar/core";
37
38
  import { createSlots, type SlotStyleProps } from "../utils/slots";
38
39
  import { useWebPagerKeys } from "../utils/useWebPagerKeys";
39
40
  import { MonthView, type MonthViewSlot } from "./MonthView";
@@ -63,6 +64,8 @@ export type MonthPagerProps<T> = {
63
64
  locale?: Locale;
64
65
  sortedMonthView?: boolean;
65
66
  moreLabel?: string;
67
+ /** Translations for the screen-reader words and gutter text; omitted keys use English. */
68
+ labels?: Partial<CalendarLabels>;
66
69
  showAdjacentMonths?: boolean;
67
70
  highlightWeekends?: boolean;
68
71
  disableMonthEventCellPress?: boolean;
@@ -124,6 +127,7 @@ function MonthPagerInner<T>({
124
127
  locale,
125
128
  sortedMonthView,
126
129
  moreLabel,
130
+ labels,
127
131
  showAdjacentMonths,
128
132
  highlightWeekends,
129
133
  disableMonthEventCellPress,
@@ -318,6 +322,7 @@ function MonthPagerInner<T>({
318
322
  locale={locale}
319
323
  sortedMonthView={sortedMonthView}
320
324
  moreLabel={moreLabel}
325
+ labels={labels}
321
326
  showAdjacentMonths={showAdjacentMonths}
322
327
  highlightWeekends={highlightWeekends}
323
328
  disableMonthEventCellPress={disableMonthEventCellPress}
@@ -356,6 +361,7 @@ function MonthPagerInner<T>({
356
361
  locale,
357
362
  sortedMonthView,
358
363
  moreLabel,
364
+ labels,
359
365
  showAdjacentMonths,
360
366
  highlightWeekends,
361
367
  disableMonthEventCellPress,
@@ -32,9 +32,13 @@ import type {
32
32
  } from "../types";
33
33
  import { createSlots, type SlotStyleProps } from "../utils/slots";
34
34
  import { withEventAccessibilityLabel } from "../utils/withEventAccessibilityLabel";
35
+ import { CalendarLabelsContext } from "../utils/labels";
35
36
  import {
37
+ type CalendarLabels,
36
38
  type DateRange,
37
39
  type EventAccessibilityLabeler,
40
+ dayAccessibilityLabel,
41
+ resolveCalendarLabels,
38
42
  type WeekdayFormat,
39
43
  daySelectionState,
40
44
  isDateSelectable,
@@ -167,6 +171,8 @@ export type MonthViewProps<T> = SlotStyleProps<MonthViewSlot> & {
167
171
  sortedMonthView?: boolean;
168
172
  /** Template for the overflow label; `{moreCount}` is replaced. Default "{moreCount} More". */
169
173
  moreLabel?: string;
174
+ /** Translations for the screen-reader words and gutter text; omitted keys use English. */
175
+ labels?: Partial<CalendarLabels>;
170
176
  /** Show dimmed days from adjacent months in the grid. Default true. */
171
177
  showAdjacentMonths?: boolean;
172
178
  /** Tint weekend day cells with the theme's weekend background. Default true. */
@@ -272,6 +278,7 @@ function MonthViewInner<T>({
272
278
  locale,
273
279
  sortedMonthView = true,
274
280
  moreLabel = "{moreCount} More",
281
+ labels: labelsProp,
275
282
  showAdjacentMonths = true,
276
283
  highlightWeekends = true,
277
284
  disableMonthEventCellPress = false,
@@ -310,6 +317,7 @@ function MonthViewInner<T>({
310
317
  }: MonthViewProps<T>): ReactElement {
311
318
  const theme = useCalendarTheme();
312
319
  const slot = createSlots<MonthViewSlot>({ classNames, styles: styleOverrides });
320
+ const labels = useMemo(() => resolveCalendarLabels(labelsProp), [labelsProp]);
313
321
  // Selection comes from context (so cached pages still repaint), but explicit
314
322
  // props win for direct/standalone use of MonthView.
315
323
  const selection = useCalendarSelection();
@@ -694,7 +702,14 @@ function MonthViewInner<T>({
694
702
  // Summarise the cell for screen readers: full date, today marker, and how
695
703
  // many events it holds (the chips inside are grouped under this cell).
696
704
  const eventCount = dayEvents.length;
697
- const accessibilityLabel = `${format(day, "EEEE, d LLLL yyyy", { locale })}${isToday ? ", today" : ""}${isSelected ? ", selected" : ""}${isDisabled ? ", unavailable" : ""}, ${eventCount} ${eventCount === 1 ? "event" : "events"}`;
705
+ const accessibilityLabel = dayAccessibilityLabel({
706
+ dateLabel: format(day, "EEEE, d LLLL yyyy", { locale }),
707
+ isToday,
708
+ isSelected,
709
+ isDisabled,
710
+ eventCount,
711
+ labels,
712
+ });
698
713
 
699
714
  const daySlot = slot("day", {
700
715
  // Events mode mirrors the dom renderer: left-aligned cell content with
@@ -856,7 +871,7 @@ function MonthViewInner<T>({
856
871
  : () => setMoreOpenFor({ day, events: dayEvents })
857
872
  }
858
873
  accessibilityRole="button"
859
- accessibilityLabel={`Show ${hiddenCount} more events`}
874
+ accessibilityLabel={`${labels.moreEvents(hiddenCount)}, ${format(day, "d MMMM", { locale })}`}
860
875
  allowFontScaling={false}
861
876
  >
862
877
  {moreLabel.replace("{moreCount}", String(hiddenCount))}
@@ -874,183 +889,191 @@ function MonthViewInner<T>({
874
889
  };
875
890
 
876
891
  return (
877
- <View style={styles.root}>
878
- {showTitle ? (
879
- <Text
880
- {...slot<TextStyle>("title", {
881
- base: styles.title,
882
- themed: [theme.text.monthTitle, { color: theme.colors.text }],
883
- })}
884
- allowFontScaling={false}
885
- >
886
- {format(date, "MMMM yyyy", locale ? { locale } : undefined)}
887
- </Text>
888
- ) : null}
889
- {showWeekdays ? (
890
- <View
891
- {...slot("weekdays", {
892
- base: styles.weekdayHeader,
893
- themed: theme.containers.weekdayHeader,
894
- })}
895
- >
896
- {weekdayLabels.map((day) => (
897
- <Text
898
- key={day.toISOString()}
899
- {...slot<TextStyle>("weekday", {
900
- base: styles.weekdayLabel,
901
- themed: [theme.text.weekday, { color: theme.colors.textMuted }],
902
- })}
903
- allowFontScaling={false}
904
- >
905
- {format(day, weekdayFormatToken(weekdayFormat), { locale })}
906
- </Text>
907
- ))}
908
- </View>
909
- ) : null}
910
- {moreOpenFor ? (
911
- <Modal transparent animationType="fade" visible onRequestClose={() => setMoreOpenFor(null)}>
912
- <Pressable
913
- style={styles.moreBackdrop}
914
- accessibilityLabel="Close"
915
- onPress={() => setMoreOpenFor(null)}
892
+ <CalendarLabelsContext.Provider value={labels}>
893
+ <View style={styles.root}>
894
+ {showTitle ? (
895
+ <Text
896
+ {...slot<TextStyle>("title", {
897
+ base: styles.title,
898
+ themed: [theme.text.monthTitle, { color: theme.colors.text }],
899
+ })}
900
+ allowFontScaling={false}
916
901
  >
917
- <Pressable
918
- // Swallow taps on the card so only the backdrop dismisses.
919
- onPress={() => {}}
920
- {...slot("morePopover", {
921
- base: styles.moreCard,
922
- themed: {
923
- backgroundColor: theme.colors.surface,
924
- borderColor: theme.colors.gridLine,
925
- },
926
- })}
927
- >
902
+ {format(date, "MMMM yyyy", locale ? { locale } : undefined)}
903
+ </Text>
904
+ ) : null}
905
+ {showWeekdays ? (
906
+ <View
907
+ {...slot("weekdays", {
908
+ base: styles.weekdayHeader,
909
+ themed: theme.containers.weekdayHeader,
910
+ })}
911
+ >
912
+ {weekdayLabels.map((day) => (
928
913
  <Text
929
- accessibilityRole="header"
930
- style={[styles.moreCardTitle, { color: theme.colors.text }]}
914
+ key={day.toISOString()}
915
+ {...slot<TextStyle>("weekday", {
916
+ base: styles.weekdayLabel,
917
+ themed: [theme.text.weekday, { color: theme.colors.textMuted }],
918
+ })}
931
919
  allowFontScaling={false}
932
920
  >
933
- {format(moreOpenFor.day, "EEEE, d LLLL yyyy", { locale })}
921
+ {format(day, weekdayFormatToken(weekdayFormat), { locale })}
934
922
  </Text>
935
- <ScrollView>
936
- {moreOpenFor.events.map((event, index) => (
937
- <View key={keyExtractor(event, index)} style={styles.moreCardRow}>
938
- <RenderEventComponent
939
- event={event}
940
- mode="month"
941
- isAllDay={isAllDayEvent(event)}
942
- onPress={() => {
943
- setMoreOpenFor(null);
944
- onPressEvent(event);
945
- }}
946
- />
947
- </View>
948
- ))}
949
- </ScrollView>
923
+ ))}
924
+ </View>
925
+ ) : null}
926
+ {moreOpenFor ? (
927
+ <Modal
928
+ transparent
929
+ animationType="fade"
930
+ visible
931
+ onRequestClose={() => setMoreOpenFor(null)}
932
+ >
933
+ <Pressable
934
+ style={styles.moreBackdrop}
935
+ accessibilityLabel={labels.close}
936
+ onPress={() => setMoreOpenFor(null)}
937
+ >
938
+ <Pressable
939
+ // Swallow taps on the card so only the backdrop dismisses.
940
+ onPress={() => {}}
941
+ {...slot("morePopover", {
942
+ base: styles.moreCard,
943
+ themed: {
944
+ backgroundColor: theme.colors.surface,
945
+ borderColor: theme.colors.gridLine,
946
+ },
947
+ })}
948
+ >
949
+ <Text
950
+ accessibilityRole="header"
951
+ style={[styles.moreCardTitle, { color: theme.colors.text }]}
952
+ allowFontScaling={false}
953
+ >
954
+ {format(moreOpenFor.day, "EEEE, d LLLL yyyy", { locale })}
955
+ </Text>
956
+ <ScrollView>
957
+ {moreOpenFor.events.map((event, index) => (
958
+ <View key={keyExtractor(event, index)} style={styles.moreCardRow}>
959
+ <RenderEventComponent
960
+ event={event}
961
+ mode="month"
962
+ isAllDay={isAllDayEvent(event)}
963
+ onPress={() => {
964
+ setMoreOpenFor(null);
965
+ onPressEvent(event);
966
+ }}
967
+ />
968
+ </View>
969
+ ))}
970
+ </ScrollView>
971
+ </Pressable>
950
972
  </Pressable>
951
- </Pressable>
952
- </Modal>
953
- ) : null}
954
- <MonthGridSurface gesture={dragGesture}>
955
- <View
956
- ref={gridRef}
957
- testID="month-grid"
958
- {...slot("grid", { base: styles.container })}
959
- onLayout={handleLayout}
960
- {...(isWeb && dragEnabled
961
- ? {
962
- onPointerDown: (event: RNPointerEvent) => {
963
- const point = gridPoint(event.nativeEvent.clientX, event.nativeEvent.clientY);
964
- if (point) beginDrag(point.x, point.y);
965
- },
966
- onPointerMove: (event: RNPointerEvent) => {
967
- if (!dragRef.current) return;
968
- const point = gridPoint(event.nativeEvent.clientX, event.nativeEvent.clientY);
969
- if (point) extendDrag(point.x, point.y);
970
- },
971
- }
972
- : null)}
973
- >
974
- {weeks.map((week, weekIndex) => {
975
- // Spanning bars for this row (laid out once in `weekLayouts`). A multi-day
976
- // event is one bar across its columns, stacked into lanes; the bars render
977
- // in an overlay so they can span cells, and the cells reserve the lane rows
978
- // so "+more" sits below them. `visibleLanes` mirrors the per-day cap.
979
- const rowLayout = weekLayouts[weekIndex] ?? EMPTY_LAYOUT;
980
- const visibleLanes = monthVisibleCount(rowLayout.laneCount, capacity);
981
- const cols = week.length;
982
- // With adjacent months hidden, clamp bars to the current-month columns so
983
- // none draw over the blank leading/trailing cells.
984
- let firstVisCol = 0;
985
- let lastVisCol = cols - 1;
986
- if (showGrid && !showAdjacentMonths) {
987
- const first = week.findIndex((d) => isSameMonth(d, date));
988
- if (first !== -1) {
989
- firstVisCol = first;
990
- lastVisCol = cols - 1 - [...week].reverse().findIndex((d) => isSameMonth(d, date));
973
+ </Modal>
974
+ ) : null}
975
+ <MonthGridSurface gesture={dragGesture}>
976
+ <View
977
+ ref={gridRef}
978
+ testID="month-grid"
979
+ {...slot("grid", { base: styles.container })}
980
+ onLayout={handleLayout}
981
+ {...(isWeb && dragEnabled
982
+ ? {
983
+ onPointerDown: (event: RNPointerEvent) => {
984
+ const point = gridPoint(event.nativeEvent.clientX, event.nativeEvent.clientY);
985
+ if (point) beginDrag(point.x, point.y);
986
+ },
987
+ onPointerMove: (event: RNPointerEvent) => {
988
+ if (!dragRef.current) return;
989
+ const point = gridPoint(event.nativeEvent.clientX, event.nativeEvent.clientY);
990
+ if (point) extendDrag(point.x, point.y);
991
+ },
992
+ }
993
+ : null)}
994
+ >
995
+ {weeks.map((week, weekIndex) => {
996
+ // Spanning bars for this row (laid out once in `weekLayouts`). A multi-day
997
+ // event is one bar across its columns, stacked into lanes; the bars render
998
+ // in an overlay so they can span cells, and the cells reserve the lane rows
999
+ // so "+more" sits below them. `visibleLanes` mirrors the per-day cap.
1000
+ const rowLayout = weekLayouts[weekIndex] ?? EMPTY_LAYOUT;
1001
+ const visibleLanes = monthVisibleCount(rowLayout.laneCount, capacity);
1002
+ const cols = week.length;
1003
+ // With adjacent months hidden, clamp bars to the current-month columns so
1004
+ // none draw over the blank leading/trailing cells.
1005
+ let firstVisCol = 0;
1006
+ let lastVisCol = cols - 1;
1007
+ if (showGrid && !showAdjacentMonths) {
1008
+ const first = week.findIndex((d) => isSameMonth(d, date));
1009
+ if (first !== -1) {
1010
+ firstVisCol = first;
1011
+ lastVisCol =
1012
+ cols - 1 - [...week].reverse().findIndex((d) => isSameMonth(d, date));
1013
+ }
991
1014
  }
992
- }
993
- return (
994
- <View
995
- {...slot("week", { base: styles.weekRow, themed: theme.containers.weekRow })}
996
- key={week[0].toISOString()}
997
- >
998
- {week.map((day, dayCol) => renderDay(day, dayCol, rowLayout, visibleLanes))}
999
- {showGrid ? (
1000
- <View style={[StyleSheet.absoluteFill, { pointerEvents: "box-none" }]}>
1001
- {rowLayout.segments
1002
- .filter((seg) => seg.lane < visibleLanes)
1003
- .map((seg) => {
1004
- const startCol = Math.max(seg.startCol, firstVisCol);
1005
- const endCol = Math.min(seg.endCol, lastVisCol);
1006
- if (startCol > endCol) return null;
1007
- // Fade the bar being carried, so the tinted drop target reads
1008
- // as where it is going and this as where it came from.
1009
- const isDragged = drag?.kind === "move" && drag.event === seg.event;
1010
- return (
1011
- <View
1012
- key={`bar-${seg.event.start.toISOString()}:${seg.event.title}:${seg.lane}`}
1013
- style={{
1014
- position: "absolute",
1015
- left: pct((startCol / cols) * 100),
1016
- width: pct(((endCol - startCol + 1) / cols) * 100),
1017
- top: BADGE_AREA + seg.lane * chipMetrics.chipRowHeight,
1018
- height: chipMetrics.chipHeight,
1019
- paddingHorizontal: CHIP_INSET_H,
1020
- // Let a sweep in progress reach the cells underneath.
1021
- pointerEvents: drag ? "none" : "box-none",
1022
- opacity: isDragged ? DRAGGED_BAR_OPACITY : 1,
1023
- }}
1024
- >
1025
- <RenderEventComponent
1026
- event={seg.event}
1027
- mode="month"
1028
- isAllDay={isAllDayEvent(seg.event)}
1029
- onPress={
1030
- disableMonthEventCellPress
1031
- ? () => {}
1032
- : () => {
1033
- if (consumeSuppressedPress()) return;
1034
- onPressEvent(seg.event);
1035
- }
1036
- }
1037
- onLongPress={
1038
- disableMonthEventCellPress || !onLongPressEvent
1039
- ? undefined
1040
- : () => onLongPressEvent(seg.event)
1041
- }
1042
- />
1043
- </View>
1044
- );
1045
- })}
1046
- </View>
1047
- ) : null}
1048
- </View>
1049
- );
1050
- })}
1051
- </View>
1052
- </MonthGridSurface>
1053
- </View>
1015
+ return (
1016
+ <View
1017
+ {...slot("week", { base: styles.weekRow, themed: theme.containers.weekRow })}
1018
+ key={week[0].toISOString()}
1019
+ >
1020
+ {week.map((day, dayCol) => renderDay(day, dayCol, rowLayout, visibleLanes))}
1021
+ {showGrid ? (
1022
+ <View style={[StyleSheet.absoluteFill, { pointerEvents: "box-none" }]}>
1023
+ {rowLayout.segments
1024
+ .filter((seg) => seg.lane < visibleLanes)
1025
+ .map((seg) => {
1026
+ const startCol = Math.max(seg.startCol, firstVisCol);
1027
+ const endCol = Math.min(seg.endCol, lastVisCol);
1028
+ if (startCol > endCol) return null;
1029
+ // Fade the bar being carried, so the tinted drop target reads
1030
+ // as where it is going and this as where it came from.
1031
+ const isDragged = drag?.kind === "move" && drag.event === seg.event;
1032
+ return (
1033
+ <View
1034
+ key={`bar-${seg.event.start.toISOString()}:${seg.event.title}:${seg.lane}`}
1035
+ style={{
1036
+ position: "absolute",
1037
+ left: pct((startCol / cols) * 100),
1038
+ width: pct(((endCol - startCol + 1) / cols) * 100),
1039
+ top: BADGE_AREA + seg.lane * chipMetrics.chipRowHeight,
1040
+ height: chipMetrics.chipHeight,
1041
+ paddingHorizontal: CHIP_INSET_H,
1042
+ // Let a sweep in progress reach the cells underneath.
1043
+ pointerEvents: drag ? "none" : "box-none",
1044
+ opacity: isDragged ? DRAGGED_BAR_OPACITY : 1,
1045
+ }}
1046
+ >
1047
+ <RenderEventComponent
1048
+ event={seg.event}
1049
+ mode="month"
1050
+ isAllDay={isAllDayEvent(seg.event)}
1051
+ onPress={
1052
+ disableMonthEventCellPress
1053
+ ? () => {}
1054
+ : () => {
1055
+ if (consumeSuppressedPress()) return;
1056
+ onPressEvent(seg.event);
1057
+ }
1058
+ }
1059
+ onLongPress={
1060
+ disableMonthEventCellPress || !onLongPressEvent
1061
+ ? undefined
1062
+ : () => onLongPressEvent(seg.event)
1063
+ }
1064
+ />
1065
+ </View>
1066
+ );
1067
+ })}
1068
+ </View>
1069
+ ) : null}
1070
+ </View>
1071
+ );
1072
+ })}
1073
+ </View>
1074
+ </MonthGridSurface>
1075
+ </View>
1076
+ </CalendarLabelsContext.Provider>
1054
1077
  );
1055
1078
  }
1056
1079
 
@@ -28,7 +28,6 @@ type PreviewProps<T> = {
28
28
  days: Date[];
29
29
  cellHeight: SharedValue<number>;
30
30
  dayWidth: number;
31
- hourColumnWidth: number;
32
31
  minHour: number;
33
32
  mode: CalendarMode;
34
33
  renderEvent: RenderEvent<T>;
@@ -62,7 +61,6 @@ function PreviewDay<T>({
62
61
  move,
63
62
  cellHeight,
64
63
  dayWidth,
65
- hourColumnWidth,
66
64
  minHour,
67
65
  mode,
68
66
  renderEvent: RenderEventComponent,
@@ -149,7 +147,7 @@ function PreviewDay<T>({
149
147
  position: "absolute",
150
148
  overflow: "hidden",
151
149
  padding: eventGap,
152
- left: hourColumnWidth + index * dayWidth,
150
+ left: index * dayWidth,
153
151
  width: dayWidth,
154
152
  zIndex: 100,
155
153
  },