WorkingHours API

API reference docs for theWorkingHourswidget. For examples and details on the usage of this widget, visit the widget demo page.

Props

PropsTypeDescriptionDefault
children?React.ReactNodeOptional React children to be rendered within the widget_
componentBaseType?'workingHours' | 'breaks'Determines the base configuration type for the widget. 'workingHours' for configuring working hours, 'breaks' for configuring break times'workingHours'
initialWeekDayConfig?WeekDayConfigInitial configuration for each day of the week including hours and breaks. Times are specified in minutes from midnight (e.g., 540 = 9:00 AM, 1020 = 5:00 PM){}
workingHoursPermisions?WorkingHoursPermissionsPermission settings that control what actions users can perform (add/remove slots, apply to all, 24-hour slots, time intervals)_
workingHoursPermisions?. isValidUserToRenderDeleteAndAddSlotbooleanPermission settings that control what actions users can perform (add/remove slots)false
workingHoursPermisions?. isValidUserToRenderApplyToAllbooleanPermission settings that control what actions users can perform (apply to all)false
workingHoursPermisions?. allow24HourSlotbooleanPermission settings that control what actions users can perform (24-hour slots)false
workingHoursPermisions?. timePickerInterval15 | 60 | 30 | 45 | undefinedPermission settings that control what actions users can perform (time intervals)_
customLables?CustomLablesTypeCustom text labels for UI elements to support internationalization. Includes day labels, button titles, error messages_
customLables?.toggleOffTitlestringCustom text label for the toggle off title"Closed"
customLables?. toggleDisabledTitlestringCustom text label for the toggle disabled title"Closed"
customLables?.errorMessagestringCustom text label for the error message"slots overlapping"
customLables?.deleteButtonTitlestringCustom text label for the delete button title"Delete"
customLables?. addSlotButtonTitlestringCustom text label for the add slot button title"Add Slot"
customLables?. applyToAllButtonTitlestringCustom text label for the apply to all button title"Apply to All"
customLables?.dayLabelsRecord<string, string>Custom text labels for the day labels{}
onWeekDayConfigChange?(config: WeekDayConfig) => voidCallback fired when the week day configuration changes. Use this to sync changes with parent state or API_
onValidationChange?(hasErrors: boolean, errors: string[]) => voidCallback fired when validation state changes. Critical for form validation and user feedback_
onUpdateStatusChange?(hasUpdates: boolean) => voidCallback fired when the update status changes. Indicates if user has made unsaved modifications_
gtmEventsSetUp?GtmEventsSetUpTypesGoogle Tag Manager events configuration for analytics tracking. Optional configuration for tracking user interactions_
gtmEventsSetUp?.sendGtmAnalytics(event: string, shouldPushToGTM: boolean, shouldPushToAmp: boolean) => voidGoogle Tag Manager events configuration for analytics tracking. Optional configuration for tracking user interactions_
gtmEventsSetUp?.gtmEventsObjectGtmEventsObjectGoogle Tag Manager events configuration for analytics tracking. Optional configuration for tracking user interactions_
gtmEventsSetUp?.gtmEventsObject?. toggleOnstringGoogle Tag Manager event for the toggle on action_
gtmEventsSetUp?.gtmEventsObject?. toggleOffstringGoogle Tag Manager event for the toggle off action_
gtmEventsSetUp?.gtmEventsObject?. deleteSlotstringGoogle Tag Manager event for the delete slot action_
gtmEventsSetUp?.gtmEventsObject?. addSlotstringGoogle Tag Manager event for the add slot action_
gtmEventsSetUp?.gtmEventsObject?. applyToAllstringGoogle Tag Manager event for the apply to all action_