Merged in chore/SW-3145-move-date-to-design-system (pull request #2556)
feat: SW-3145 Moved date component to design system * chore: SW-3145 Moved date component to design system Approved-by: Anton Gunnarsson Approved-by: Matilda Landström
This commit is contained in:
@@ -4,6 +4,7 @@ import { useIntl } from "react-intl"
|
||||
|
||||
import { Divider } from "@scandic-hotels/design-system/Divider"
|
||||
import CountrySelect from "@scandic-hotels/design-system/Form/Country"
|
||||
import DateSelect from "@scandic-hotels/design-system/Form/Date"
|
||||
import Phone from "@scandic-hotels/design-system/Form/Phone"
|
||||
import { Select } from "@scandic-hotels/design-system/Select"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
@@ -13,7 +14,6 @@ import {
|
||||
getLocalizedLanguageOptions,
|
||||
} from "@/constants/languages"
|
||||
|
||||
import DateSelect from "@/components/TempDesignSystem/Form/Date"
|
||||
import Input from "@/components/TempDesignSystem/Form/Input"
|
||||
import PasswordInput from "@/components/TempDesignSystem/Form/PasswordInput"
|
||||
import useLang from "@/hooks/useLang"
|
||||
@@ -41,7 +41,20 @@ export default function FormContent({ errors }: { errors: FieldErrors }) {
|
||||
</p>
|
||||
</Typography>
|
||||
</header>
|
||||
<DateSelect name="dateOfBirth" registerOptions={{ required: true }} />
|
||||
<DateSelect
|
||||
labels={{
|
||||
day: intl.formatMessage({ defaultMessage: "Day" }),
|
||||
month: intl.formatMessage({ defaultMessage: "Month" }),
|
||||
year: intl.formatMessage({ defaultMessage: "Year" }),
|
||||
errorMessage: getErrorMessage(
|
||||
intl,
|
||||
errors["dateOfBirth"]?.message?.toString()
|
||||
),
|
||||
}}
|
||||
lang={lang}
|
||||
name="dateOfBirth"
|
||||
registerOptions={{ required: true }}
|
||||
/>
|
||||
<Input
|
||||
data-hj-suppress
|
||||
label={`${intl.formatMessage({
|
||||
|
||||
Reference in New Issue
Block a user