feat(ui): enhance endpoint selection and date picker
This commit is contained in:
@@ -57,6 +57,7 @@ export function DateTimePicker({
|
||||
const placeholderText = placeholder ?? t('Select date')
|
||||
const calendarLocale =
|
||||
calendarLocales[i18n.language as keyof typeof calendarLocales] ?? enUS
|
||||
const currentYear = new Date().getFullYear()
|
||||
const [open, setOpen] = React.useState(false)
|
||||
const [date, setDate] = React.useState<Date | undefined>(value)
|
||||
const [month, setMonth] = React.useState<Date | undefined>(value)
|
||||
@@ -134,6 +135,8 @@ export function DateTimePicker({
|
||||
captionLayout='dropdown'
|
||||
onSelect={handleDateSelect}
|
||||
locale={calendarLocale}
|
||||
startMonth={new Date(currentYear - 100, 0)}
|
||||
endMonth={new Date(currentYear + 100, 11)}
|
||||
/>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
|
||||
Reference in New Issue
Block a user