Skip to content

Commit

Permalink
fix(datefield): useSystemSettings instead of settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Birkbjo committed Oct 8, 2024
1 parent e5bae04 commit 475225c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/form/fields/DateField.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CalendarInput, CalendarInputProps } from '@dhis2/ui'
import React from 'react'
import { useField } from 'react-final-form'
import { selectedLocale, useSystemSettings } from '../../../lib'
import { selectedLocale, useSystemSetting } from '../../../lib'

type DateFieldProps = Omit<
CalendarInputProps,
Expand All @@ -16,8 +16,7 @@ export function DateField({
label,
...calendarInputProps
}: DateFieldProps) {
const settings = useSystemSettings()
const { keyCalendar: calendar } = settings
const calendar = useSystemSetting('keyCalendar')
const locale = selectedLocale
const { meta, input } = useField<string | undefined>(name, {
format: (value) => {
Expand Down

0 comments on commit 475225c

Please sign in to comment.