diff --git a/docs/platform/atoms/availability-settings.mdx b/docs/platform/atoms/availability-settings.mdx
index d792b09a8c..79a7590e8e 100644
--- a/docs/platform/atoms/availability-settings.mdx
+++ b/docs/platform/atoms/availability-settings.mdx
@@ -133,3 +133,59 @@ Along with the props, Availability settings atom accepts custom styles via the *
| overridesModalClassNames | Adds styling to the date overrides modal |
Please ensure all custom classnames are valid [Tailwind CSS](https://tailwindcss.com/) classnames.
+
+## Programmatic Form Validation and Submission
+
+The AvailabilitySettings component supports programmatic form validation and submission through a ref-based API. This allows you to validate availability data and submit forms programmatically without user interaction.
+
+```js
+import { useRef } from 'react';
+import { AvailabilitySettings } from "@calcom/atoms";
+import type { AvailabilitySettingsFormRef } from "@calcom/atoms";
+
+export function AvailabilityWithValidation() {
+ const availabilityRef = useRef(null);
+
+ const handleValidate = async () => {
+ const result = await availabilityRef.current?.validateForm();
+ if (result?.isValid) {
+ console.log("Availability form is valid");
+ } else {
+ console.log("Validation errors:", result?.errors);
+ }
+ };
+
+ const handleSubmit = () => {
+ availabilityRef.current?.handleFormSubmit();
+ };
+
+ return (
+ <>
+ {
+ console.log("Updated schedule successfully");
+ }}
+ onFormStateChange={(formState) => {
+ console.log("Form state changed:", formState);
+ }}
+ />
+
+
+ >
+ );
+}
+```
+
+### Ref Methods
+
+| Method | Description |
+|:-------|:------------|
+| validateForm | Validates the current availability form state and returns a promise with validation results. |
+| handleFormSubmit | Programmatically submits the availability form, triggering the same validation and submission flow as clicking the save button. Unlike `validateForm`, this method will check required fields and prevent submission unless all required fields are set |
+
+The `validateForm` method returns an `AvailabilityFormValidationResult` object with:
+- `isValid`: Boolean indicating if the form passed validation
+- `errors`: Object containing any validation errors found
+
+**Note:** If a required field is not filled in, the `validateForm` method will not return any error. The validation focuses on the format and consistency of provided data rather than enforcing required field completion.
diff --git a/docs/platform/atoms/event-type.mdx b/docs/platform/atoms/event-type.mdx
index 8b4ce017a1..aa8ab19540 100644
--- a/docs/platform/atoms/event-type.mdx
+++ b/docs/platform/atoms/event-type.mdx
@@ -196,6 +196,60 @@ Along with the props, event type settings atom accepts custom styles via the **c
Please ensure all custom classnames are valid [Tailwind CSS](https://tailwindcss.com/) classnames.
+## Programmatic Form Validation and Submission
+
+The EventTypeSettings component supports programmatic form validation and submission through a ref-based API. This allows you to validate form data and submit forms programmatically without user interaction.
+
+```js
+import { useRef } from 'react';
+import { EventTypeSettings } from "@calcom/atoms";
+import type { EventTypePlatformWrapperRef } from "@calcom/atoms";
+
+export function EventTypeWithValidation(eventTypeId: number) {
+ const eventTypeRef = useRef(null);
+
+ const handleValidate = async () => {
+ const result = await eventTypeRef.current?.validateForm();
+ if (result?.isValid) {
+ console.log("Form is valid");
+ } else {
+ console.log("Validation errors:", result?.errors);
+ }
+ };
+
+ const handleSubmit = () => {
+ eventTypeRef.current?.handleFormSubmit();
+ };
+
+ return (
+ <>
+ {
+ console.log("EventType updated successfully", eventType);
+ }}
+ />
+
+
+ >
+ );
+}
+```
+
+### Ref Methods
+
+| Method | Description |
+|:-------|:------------|
+| validateForm | Validates the current event type form state and returns a promise with validation results. |
+| handleFormSubmit | Programmatically submits the event type form, triggering the same validation and submission flow as clicking the save button. Unlike `validateForm`, this method will check required fields and prevent submission unless all required fields are set |
+
+The `validateForm` method returns an `EventTypeFormValidationResult` object with:
+- `isValid`: Boolean indicating if the form passed validation
+- `errors`: Object containing any validation errors found
+
+**Note:** If a required field is not filled in, the `validateForm` method will not return any error. The validation focuses on the format and consistency of provided data rather than enforcing required field completion.
+
Following are the tabs that are available in the event type settings atom:
diff --git a/packages/features/eventtypes/components/EventType.tsx b/packages/features/eventtypes/components/EventType.tsx
index db0fc96495..ff7239b440 100644
--- a/packages/features/eventtypes/components/EventType.tsx
+++ b/packages/features/eventtypes/components/EventType.tsx
@@ -64,6 +64,7 @@ export type EventTypeComponentProps = EventTypeSetupProps & {
tabName: (typeof tabs)[number];
tabsNavigation: VerticalTabItemProps[];
allowDelete?: boolean;
+ saveButtonRef?: React.RefObject;
};
export const EventType = ({
@@ -82,6 +83,7 @@ export const EventType = ({
handleSubmit,
children,
allowDelete = true,
+ saveButtonRef,
}: EventTypeComponentProps) => {
const [animationParentRef] = useAutoAnimate();
@@ -101,7 +103,8 @@ export const EventType = ({
isDeleting={isDeleting}
isPlatform={isPlatform}
allowDelete={allowDelete}
- tabsNavigation={tabsNavigation}>
+ tabsNavigation={tabsNavigation}
+ saveButtonRef={saveButtonRef}>
diff --git a/packages/features/eventtypes/components/EventTypeLayout.tsx b/packages/features/eventtypes/components/EventTypeLayout.tsx
index 918bac27ef..20d4cb4610 100644
--- a/packages/features/eventtypes/components/EventTypeLayout.tsx
+++ b/packages/features/eventtypes/components/EventTypeLayout.tsx
@@ -47,6 +47,7 @@ type Props = {
isPlatform?: boolean;
tabsNavigation: VerticalTabItemProps[];
allowDelete?: boolean;
+ saveButtonRef?: React.RefObject;
};
function EventTypeSingleLayout({
@@ -64,6 +65,7 @@ function EventTypeSingleLayout({
isPlatform,
tabsNavigation,
allowDelete = true,
+ saveButtonRef,
}: Props) {
const { t } = useLocale();
const eventTypesLockedByOrg = eventType.team?.parent?.organizationSettings?.lockEventTypeCreationForUsers;
@@ -262,6 +264,7 @@ function EventTypeSingleLayout({