Skip to content

Commit

Permalink
feat: 🎸 [DateTimePicker]Changed return value to Date obj
Browse files Browse the repository at this point in the history
✅ Closes: #351
  • Loading branch information
CrisGrud committed Oct 19, 2023
1 parent 57829c4 commit fec805e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/DateTimePicker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const DateTimePicker: FC<DateTimePickerType> = ({
const onAcceptIso = useCallback(
(value: DateTime | undefined | null) => {
if (onAccept) {
onAccept(value?.toISO());
onAccept(value?.toJSDate());
}
},
[onAccept]
Expand Down
2 changes: 1 addition & 1 deletion src/types/DateTimePicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { IBase } from "./Base";
export type DateTimePickerType = IBase & {
label: string;
value?: Date | string | number;
onAccept?: (value: string | undefined | null) => void;
onAccept?: (value: Date | undefined | null) => void;
ampm?: boolean;
mobileView?: boolean;
timeZone?: string;
Expand Down

0 comments on commit fec805e

Please sign in to comment.