diff --git a/lib/components/DateTime/index.test.tsx b/lib/components/DateTime/index.test.tsx
index 1941624..39b8d94 100644
--- a/lib/components/DateTime/index.test.tsx
+++ b/lib/components/DateTime/index.test.tsx
@@ -1,6 +1,6 @@
import { describe, it, expect, beforeEach, vi } from 'vitest'
import { render, cleanup, fireEvent } from '@testing-library/react'
-import { DateTime } from '../../main.ts'
+import { DateTime } from './index'
import { iso2LocalDateTime } from '../../utilities/dates'
describe('', () => {
@@ -146,4 +146,39 @@ describe('', () => {
const expectedUpdatedLocal = iso2LocalDateTime('2021-01-02T01:00:00Z')
expect(input.value).toBe(expectedUpdatedLocal)
})
+
+ it('should use standard min and max props when isoMin and isoMax are not provided', () => {
+ const { getByTestId } = render(
+ ,
+ )
+ const input = getByTestId('test-minmax') as HTMLInputElement
+ expect(input.min).toBe('2021-01-01T00:00')
+ expect(input.max).toBe('2021-12-31T23:59')
+ })
+
+ it('should use value prop when isoValue is not provided', () => {
+ const { getByTestId } = render(
+ ,
+ )
+ const input = getByTestId('test-value') as HTMLInputElement
+ expect(input.value).toBe('2021-01-01T00:00')
+ })
+
+ it('should handle invalid isoValue', () => {
+ const onChangeISOValue = vi.fn()
+ render(
+ ,
+ )
+ expect(onChangeISOValue).not.toHaveBeenCalled()
+ })
})
diff --git a/lib/components/DateTime/index.tsx b/lib/components/DateTime/index.tsx
index e9b053b..46a6ed0 100644
--- a/lib/components/DateTime/index.tsx
+++ b/lib/components/DateTime/index.tsx
@@ -68,6 +68,8 @@ export const DateTime = forwardRef((props, ref)
)
})
+DateTime.displayName = 'DateTime'
+
/**
* The properties for the DateTime component.
*