diff --git a/package.json b/package.json
index e8e03e0..d4f6af9 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "bbodek-ui",
- "version": "0.0.87",
+ "version": "0.0.88",
"type": "module",
"author": "Bbodek",
"license": "MIT",
diff --git a/src/core/components/Input/InputDatePicker/InputDatePicker.stories.tsx b/src/core/components/Input/InputDatePicker/InputDatePicker.stories.tsx
index ed2328c..377af69 100644
--- a/src/core/components/Input/InputDatePicker/InputDatePicker.stories.tsx
+++ b/src/core/components/Input/InputDatePicker/InputDatePicker.stories.tsx
@@ -1,6 +1,7 @@
import { Meta } from "@storybook/react";
import { OverlayProvider, useOverlay } from "@toss/use-overlay";
+import { PeriodDates } from "../../Calendar/DatePickerCalendar/types/CalendarComponentProps";
import ModalPopUp from "../../Modal/ModalPopUp";
import InputDatePicker from "./index";
@@ -16,11 +17,12 @@ export default meta;
const DefaultLayout = () => {
const overlay = useOverlay();
+ const getDate = (periodDates: PeriodDates) => console.log(periodDates);
return (
);
@@ -38,11 +40,13 @@ export const Default = () => {
const InputDatePickerInModalPopUpLayout = () => {
const overlay = useOverlay();
const inputDatePickerOverlay = useOverlay();
+ const getDate = (periodDates: PeriodDates) => console.log(periodDates);
+
const onOverlay = () => {
overlay.open(({ isOpen }) => {
return (
-
+
);
});
diff --git a/src/core/components/Input/InputDatePicker/index.tsx b/src/core/components/Input/InputDatePicker/index.tsx
index 11dbc84..8c32938 100644
--- a/src/core/components/Input/InputDatePicker/index.tsx
+++ b/src/core/components/Input/InputDatePicker/index.tsx
@@ -10,6 +10,7 @@ import { InputDatePickerProps } from "./types";
const InputDatePicker = ({
overlay,
disabledDates,
+ getPeriodDates,
currentMonth,
useTab = false,
disabled = false,
@@ -30,6 +31,7 @@ const InputDatePicker = ({
currentMonth = {currentMonth}
close = {(periodDates: PeriodDates) => {
resolve(periodDates);
+ getPeriodDates(periodDates);
close();
}}
useTab = {useTab}
diff --git a/src/core/components/Input/InputDatePicker/types/index.ts b/src/core/components/Input/InputDatePicker/types/index.ts
index b06ff8e..756a214 100644
--- a/src/core/components/Input/InputDatePicker/types/index.ts
+++ b/src/core/components/Input/InputDatePicker/types/index.ts
@@ -13,6 +13,7 @@ type CreateOverlayElement = (props: {
}) => JSX.Element;
export interface InputDatePickerProps extends Omit {
+ getPeriodDates: (periodDates: PeriodDates) => void;
overlay: {
open: (overlayElement: CreateOverlayElement) => void;
close: () => void;