Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"type": { "name": "arrayOf", "description": "Array<object>" },
"default": "[]"
},
"localeText": { "type": { "name": "object" } },
"onEventsChange": { "type": { "name": "func" } },
"onPreferencesChange": { "type": { "name": "func" } },
"onViewChange": { "type": { "name": "func" } },
Expand Down
1 change: 1 addition & 0 deletions docs/pages/x/api/scheduler/standalone-agenda-view.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"type": { "name": "arrayOf", "description": "Array<object>" },
"default": "[]"
},
"localeText": { "type": { "name": "object" } },
"onEventsChange": { "type": { "name": "func" } },
"onPreferencesChange": { "type": { "name": "func" } },
"onViewChange": { "type": { "name": "func" } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"type": { "name": "arrayOf", "description": "Array<object>" },
"default": "[]"
},
"localeText": { "type": { "name": "object" } },
"onEventsChange": { "type": { "name": "func" } },
"onPreferencesChange": { "type": { "name": "func" } },
"onViewChange": { "type": { "name": "func" } },
Expand Down
1 change: 1 addition & 0 deletions docs/pages/x/api/scheduler/standalone-day-view.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"type": { "name": "arrayOf", "description": "Array<object>" },
"default": "[]"
},
"localeText": { "type": { "name": "object" } },
"onEventsChange": { "type": { "name": "func" } },
"onPreferencesChange": { "type": { "name": "func" } },
"onViewChange": { "type": { "name": "func" } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"type": { "name": "arrayOf", "description": "Array<object>" },
"default": "[]"
},
"localeText": { "type": { "name": "object" } },
"onEventsChange": { "type": { "name": "func" } },
"onPreferencesChange": { "type": { "name": "func" } },
"onViewChange": { "type": { "name": "func" } },
Expand Down
1 change: 1 addition & 0 deletions docs/pages/x/api/scheduler/standalone-month-view.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"type": { "name": "arrayOf", "description": "Array<object>" },
"default": "[]"
},
"localeText": { "type": { "name": "object" } },
"onEventsChange": { "type": { "name": "func" } },
"onPreferencesChange": { "type": { "name": "func" } },
"onViewChange": { "type": { "name": "func" } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"type": { "name": "arrayOf", "description": "Array<object>" },
"default": "[]"
},
"localeText": { "type": { "name": "object" } },
"onEventsChange": { "type": { "name": "func" } },
"onPreferencesChange": { "type": { "name": "func" } },
"onViewChange": { "type": { "name": "func" } },
Expand Down
1 change: 1 addition & 0 deletions docs/pages/x/api/scheduler/standalone-week-view.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"type": { "name": "arrayOf", "description": "Array<object>" },
"default": "[]"
},
"localeText": { "type": { "name": "object" } },
"onEventsChange": { "type": { "name": "func" } },
"onPreferencesChange": { "type": { "name": "func" } },
"onViewChange": { "type": { "name": "func" } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
"description": "The structure of the event model. It defines how to read and write the properties of the event model. If not provided, the event model is assumed to match the <code>CalendarEvent</code> interface."
},
"events": { "description": "The events currently available in the calendar." },
"localeText": {
"description": "Set the locale text of the view. You can find all the translation keys supported in <a href=\"https://github.com/mui/mui-x/blob/HEAD/packages/x-scheduler/src/models/translations.ts\">the source</a> in the GitHub repository."
},
"onEventsChange": { "description": "Callback fired when some event of the calendar change." },
"onPreferencesChange": { "description": "Event handler called when the preferences change." },
"onViewChange": { "description": "Event handler called when the view changes." },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
"description": "The structure of the event model. It defines how to read and write the properties of the event model. If not provided, the event model is assumed to match the <code>CalendarEvent</code> interface."
},
"events": { "description": "The events currently available in the calendar." },
"localeText": {
"description": "Set the locale text of the view. You can find all the translation keys supported in <a href=\"https://github.com/mui/mui-x/blob/HEAD/packages/x-scheduler/src/models/translations.ts\">the source</a> in the GitHub repository."
},
"onEventsChange": { "description": "Callback fired when some event of the calendar change." },
"onPreferencesChange": { "description": "Event handler called when the preferences change." },
"onViewChange": { "description": "Event handler called when the view changes." },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
"description": "The structure of the event model. It defines how to read and write the properties of the event model. If not provided, the event model is assumed to match the <code>CalendarEvent</code> interface."
},
"events": { "description": "The events currently available in the calendar." },
"localeText": {
"description": "Set the locale text of the view. You can find all the translation keys supported in <a href=\"https://github.com/mui/mui-x/blob/HEAD/packages/x-scheduler/src/models/translations.ts\">the source</a> in the GitHub repository."
},
"onEventsChange": { "description": "Callback fired when some event of the calendar change." },
"onPreferencesChange": { "description": "Event handler called when the preferences change." },
"onViewChange": { "description": "Event handler called when the view changes." },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
"description": "The structure of the event model. It defines how to read and write the properties of the event model. If not provided, the event model is assumed to match the <code>CalendarEvent</code> interface."
},
"events": { "description": "The events currently available in the calendar." },
"localeText": {
"description": "Set the locale text of the view. You can find all the translation keys supported in <a href=\"https://github.com/mui/mui-x/blob/HEAD/packages/x-scheduler/src/models/translations.ts\">the source</a> in the GitHub repository."
},
"onEventsChange": { "description": "Callback fired when some event of the calendar change." },
"onPreferencesChange": { "description": "Event handler called when the preferences change." },
"onViewChange": { "description": "Event handler called when the view changes." },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
"description": "The structure of the event model. It defines how to read and write the properties of the event model. If not provided, the event model is assumed to match the <code>CalendarEvent</code> interface."
},
"events": { "description": "The events currently available in the calendar." },
"localeText": {
"description": "Set the locale text of the view. You can find all the translation keys supported in <a href=\"https://github.com/mui/mui-x/blob/HEAD/packages/x-scheduler/src/models/translations.ts\">the source</a> in the GitHub repository."
},
"onEventsChange": { "description": "Callback fired when some event of the calendar change." },
"onPreferencesChange": { "description": "Event handler called when the preferences change." },
"onViewChange": { "description": "Event handler called when the view changes." },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
"description": "The structure of the event model. It defines how to read and write the properties of the event model. If not provided, the event model is assumed to match the <code>CalendarEvent</code> interface."
},
"events": { "description": "The events currently available in the calendar." },
"localeText": {
"description": "Set the locale text of the view. You can find all the translation keys supported in <a href=\"https://github.com/mui/mui-x/blob/HEAD/packages/x-scheduler/src/models/translations.ts\">the source</a> in the GitHub repository."
},
"onEventsChange": { "description": "Callback fired when some event of the calendar change." },
"onPreferencesChange": { "description": "Event handler called when the preferences change." },
"onViewChange": { "description": "Event handler called when the view changes." },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
"description": "The structure of the event model. It defines how to read and write the properties of the event model. If not provided, the event model is assumed to match the <code>CalendarEvent</code> interface."
},
"events": { "description": "The events currently available in the calendar." },
"localeText": {
"description": "Set the locale text of the view. You can find all the translation keys supported in <a href=\"https://github.com/mui/mui-x/blob/HEAD/packages/x-scheduler/src/models/translations.ts\">the source</a> in the GitHub repository."
},
"onEventsChange": { "description": "Callback fired when some event of the calendar change." },
"onPreferencesChange": { "description": "Event handler called when the preferences change." },
"onViewChange": { "description": "Event handler called when the view changes." },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
"description": "The structure of the event model. It defines how to read and write the properties of the event model. If not provided, the event model is assumed to match the <code>CalendarEvent</code> interface."
},
"events": { "description": "The events currently available in the calendar." },
"localeText": {
"description": "Set the locale text of the view. You can find all the translation keys supported in <a href=\"https://github.com/mui/mui-x/blob/HEAD/packages/x-scheduler/src/models/translations.ts\">the source</a> in the GitHub repository."
},
"onEventsChange": { "description": "Callback fired when some event of the calendar change." },
"onPreferencesChange": { "description": "Event handler called when the preferences change." },
"onViewChange": { "description": "Event handler called when the view changes." },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type {
CollapsibleResourcesParameterKeys,
} from '@mui/x-scheduler-internals/use-event-calendar';
import type { EventCalendarViewConfig } from '@mui/x-scheduler-internals/models';
import type { EventCalendarLocaleText } from '@mui/x-scheduler/models';
import type { AgendaViewProps } from '@mui/x-scheduler/agenda-view';

export interface StandaloneAgendaViewPremiumProps<TEvent extends object, TResource extends object>
Expand All @@ -23,6 +24,12 @@ export interface StandaloneAgendaViewPremiumProps<TEvent extends object, TResour
* The `agenda` view does not support any configuration keys yet.
*/
viewConfig?: Omit<EventCalendarViewConfig, 'day' | 'week'>;
/**
* Set the locale text of the view.
* You can find all the translation keys supported in [the source](https://github.com/mui/mui-x/blob/HEAD/packages/x-scheduler/src/models/translations.ts)
* in the GitHub repository.
*/
localeText?: Partial<EventCalendarLocaleText>;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import { useThemeProps } from '@mui/material/styles';
import { useLicenseVerifier, Watermark } from '@mui/x-license/internals';
import { useExtractEventCalendarParameters } from '@mui/x-scheduler-internals/use-event-calendar';
import { EventCalendarPremiumStore } from '@mui/x-scheduler-internals-premium/use-event-calendar-premium';
Expand All @@ -23,21 +24,30 @@ const StandaloneAgendaViewPremium = React.forwardRef(function StandaloneAgendaVi
TEvent extends object,
TResource extends object,
>(
props: StandaloneAgendaViewPremiumProps<TEvent, TResource>,
inProps: StandaloneAgendaViewPremiumProps<TEvent, TResource>,
forwardedRef: React.ForwardedRef<HTMLDivElement>,
) {
useLicenseVerifier(packageInfo);

// eslint-disable-next-line mui/material-ui-name-matches-component-name
const props = useThemeProps({ props: inProps, name: 'MuiEventCalendar' });

const { parameters, forwardedProps } = useExtractEventCalendarParameters<
TEvent,
TResource,
typeof props
>(props);

const { localeText, ...other } = forwardedProps;

return (
<EventCalendarProvider {...parameters} storeClass={EventCalendarPremiumStore}>
<EventCalendarProvider
{...parameters}
storeClass={EventCalendarPremiumStore}
localeText={localeText}
>
<EventDialogProvider optionalRenderers={PREMIUM_EVENT_DIALOG_OPTIONAL_RENDERERS}>
<AgendaView ref={forwardedRef} {...forwardedProps} />
<AgendaView ref={forwardedRef} {...other} />
{watermark}
</EventDialogProvider>
</EventCalendarProvider>
Expand Down Expand Up @@ -178,6 +188,12 @@ StandaloneAgendaViewPremium.propTypes /* remove-proptypes */ = {
* @default []
*/
events: PropTypes.arrayOf(PropTypes.object),
/**
* Set the locale text of the view.
* You can find all the translation keys supported in [the source](https://github.com/mui/mui-x/blob/HEAD/packages/x-scheduler/src/models/translations.ts)
* in the GitHub repository.
*/
localeText: PropTypes.object,
/**
* Callback fired when some event of the calendar change.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type {
CollapsibleResourcesParameterKeys,
} from '@mui/x-scheduler-internals/use-event-calendar';
import type { EventCalendarViewConfig } from '@mui/x-scheduler-internals/models';
import type { EventCalendarLocaleText } from '@mui/x-scheduler/models';
import type { DayViewProps } from '@mui/x-scheduler/day-view';

export interface StandaloneDayViewPremiumProps<TEvent extends object, TResource extends object>
Expand All @@ -25,6 +26,12 @@ export interface StandaloneDayViewPremiumProps<TEvent extends object, TResource
* @example { day: { startTime: 8, endTime: 20 } }
*/
viewConfig?: Pick<EventCalendarViewConfig, 'day'>;
/**
* Set the locale text of the view.
* You can find all the translation keys supported in [the source](https://github.com/mui/mui-x/blob/HEAD/packages/x-scheduler/src/models/translations.ts)
* in the GitHub repository.
*/
localeText?: Partial<EventCalendarLocaleText>;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import { useThemeProps } from '@mui/material/styles';
import { useLicenseVerifier, Watermark } from '@mui/x-license/internals';
import { useExtractEventCalendarParameters } from '@mui/x-scheduler-internals/use-event-calendar';
import { EventCalendarPremiumStore } from '@mui/x-scheduler-internals-premium/use-event-calendar-premium';
Expand All @@ -23,21 +24,30 @@ const StandaloneDayViewPremium = React.forwardRef(function StandaloneDayViewPrem
TEvent extends object,
TResource extends object,
>(
props: StandaloneDayViewPremiumProps<TEvent, TResource>,
inProps: StandaloneDayViewPremiumProps<TEvent, TResource>,
forwardedRef: React.ForwardedRef<HTMLDivElement>,
) {
useLicenseVerifier(packageInfo);

// eslint-disable-next-line mui/material-ui-name-matches-component-name
const props = useThemeProps({ props: inProps, name: 'MuiEventCalendar' });

const { parameters, forwardedProps } = useExtractEventCalendarParameters<
TEvent,
TResource,
typeof props
>(props);

const { localeText, ...other } = forwardedProps;

return (
<EventCalendarProvider {...parameters} storeClass={EventCalendarPremiumStore}>
<EventCalendarProvider
{...parameters}
storeClass={EventCalendarPremiumStore}
localeText={localeText}
>
<EventDialogProvider optionalRenderers={PREMIUM_EVENT_DIALOG_OPTIONAL_RENDERERS}>
<DayView ref={forwardedRef} {...forwardedProps} />
<DayView ref={forwardedRef} {...other} />
{watermark}
</EventDialogProvider>
</EventCalendarProvider>
Expand Down Expand Up @@ -178,6 +188,12 @@ StandaloneDayViewPremium.propTypes /* remove-proptypes */ = {
* @default []
*/
events: PropTypes.arrayOf(PropTypes.object),
/**
* Set the locale text of the view.
* You can find all the translation keys supported in [the source](https://github.com/mui/mui-x/blob/HEAD/packages/x-scheduler/src/models/translations.ts)
* in the GitHub repository.
*/
localeText: PropTypes.object,
/**
* Callback fired when some event of the calendar change.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type {
CollapsibleResourcesParameterKeys,
} from '@mui/x-scheduler-internals/use-event-calendar';
import type { EventCalendarViewConfig } from '@mui/x-scheduler-internals/models';
import type { EventCalendarLocaleText } from '@mui/x-scheduler/models';
import type { MonthViewProps } from '@mui/x-scheduler/month-view';

export interface StandaloneMonthViewPremiumProps<TEvent extends object, TResource extends object>
Expand All @@ -23,6 +24,12 @@ export interface StandaloneMonthViewPremiumProps<TEvent extends object, TResourc
* The `month` view does not support any configuration keys yet.
*/
viewConfig?: Omit<EventCalendarViewConfig, 'day' | 'week'>;
/**
* Set the locale text of the view.
* You can find all the translation keys supported in [the source](https://github.com/mui/mui-x/blob/HEAD/packages/x-scheduler/src/models/translations.ts)
* in the GitHub repository.
*/
localeText?: Partial<EventCalendarLocaleText>;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import { useThemeProps } from '@mui/material/styles';
import { useLicenseVerifier, Watermark } from '@mui/x-license/internals';
import { useExtractEventCalendarParameters } from '@mui/x-scheduler-internals/use-event-calendar';
import { EventCalendarPremiumStore } from '@mui/x-scheduler-internals-premium/use-event-calendar-premium';
Expand All @@ -23,21 +24,30 @@ const StandaloneMonthViewPremium = React.forwardRef(function StandaloneMonthView
TEvent extends object,
TResource extends object,
>(
props: StandaloneMonthViewPremiumProps<TEvent, TResource>,
inProps: StandaloneMonthViewPremiumProps<TEvent, TResource>,
forwardedRef: React.ForwardedRef<HTMLDivElement>,
) {
useLicenseVerifier(packageInfo);

// eslint-disable-next-line mui/material-ui-name-matches-component-name
const props = useThemeProps({ props: inProps, name: 'MuiEventCalendar' });

const { parameters, forwardedProps } = useExtractEventCalendarParameters<
TEvent,
TResource,
typeof props
>(props);

const { localeText, ...other } = forwardedProps;

return (
<EventCalendarProvider {...parameters} storeClass={EventCalendarPremiumStore}>
<EventCalendarProvider
{...parameters}
storeClass={EventCalendarPremiumStore}
localeText={localeText}
>
<EventDialogProvider optionalRenderers={PREMIUM_EVENT_DIALOG_OPTIONAL_RENDERERS}>
<MonthView ref={forwardedRef} {...forwardedProps} />
<MonthView ref={forwardedRef} {...other} />
{watermark}
</EventDialogProvider>
</EventCalendarProvider>
Expand Down Expand Up @@ -178,6 +188,12 @@ StandaloneMonthViewPremium.propTypes /* remove-proptypes */ = {
* @default []
*/
events: PropTypes.arrayOf(PropTypes.object),
/**
* Set the locale text of the view.
* You can find all the translation keys supported in [the source](https://github.com/mui/mui-x/blob/HEAD/packages/x-scheduler/src/models/translations.ts)
* in the GitHub repository.
*/
localeText: PropTypes.object,
/**
* Callback fired when some event of the calendar change.
*/
Expand Down
Loading
Loading