-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 🎸 [DateTimePicker] added no ampm format
✅ Closes: #336
- Loading branch information
CrisGrud
committed
Oct 3, 2023
1 parent
d1453ad
commit 6e0d464
Showing
3 changed files
with
17 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
src/components/TimePicker/index.tsx → src/components/DateTimePicker/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
import React, { FC } from "react"; | ||
import { AdapterLuxon } from "@mui/x-date-pickers/AdapterLuxon"; | ||
import { DateTimePicker } from "@mui/x-date-pickers/DateTimePicker"; | ||
import { DateTimePicker as MuiDateTimePicker } from "@mui/x-date-pickers/DateTimePicker"; | ||
import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider"; | ||
|
||
export const DATA_CY_DEFAULT = "timePicker"; | ||
|
||
const TimePicker: FC<any> = ({ dataCy = DATA_CY_DEFAULT }) => { | ||
const DateTimePicker: FC<any> = ({ dataCy = DATA_CY_DEFAULT }) => { | ||
return ( | ||
<LocalizationProvider dateAdapter={AdapterLuxon}> | ||
<DateTimePicker | ||
<MuiDateTimePicker | ||
data-cy={dataCy} | ||
label="Date Time" | ||
views={["year", "month", "day", "hours", "minutes", "seconds"]} | ||
format="dd/MM/yyyy HH:mm:ss" | ||
ampm={false} | ||
/> | ||
</LocalizationProvider> | ||
); | ||
}; | ||
|
||
export default TimePicker; | ||
export default DateTimePicker; |