Standard Form Fields

DateRangeField

DateRangeField selects start and end date pairs, returning [startDate, endDate] arrays for server queries.

Dual calendar popup with linked date selection
Preset range shortcuts ('This Month', 'Last 30 Days')
React Hook Form integration

Props & Configuration

4 props

Complete property specifications, parameter types, and default fallbacks.

PropertyTypeDefaultDescription
idRequiredstring—Form state key name.
controlRequiredControl<any>—React Hook Form control instance.
labelstring—Field label.
formatstring"YYYY-MM-DD"Date format string.

Interactive Examples & Live Previews

1 Demos

Every example includes its own live, interactive preview element alongside the corresponding copyable TypeScript snippet.

Example 1

Basic Billing Date Range

Start and end date picker.

Live Interactive Demo
React Hook Form Live State:{"testInput":"Sample text","testPassword":"secretPassword123","testSelect":"editor","testNumber":42,"testTextArea":"This is a multi-line text area content for enterprise use.","testSwitch":true,"testCheckbox":true,"testRadio":"b","testSlider":65,"testRating":4,"testColor":"#e05d44","testCountry":"US","testPhone":"+1 (555) 019-2834","testOtp":"123456"}
DateRangeField.basic.tsxtsx
1import React from "react";
2import { useForm } from "react-hook-form";
3import { DateRangeField } from "antd-dynamic-ui";
4
5export default function BasicDateRange() {
6 const { control } = useForm();
7 return (
8 <div className="max-w-md">
9 <DateRangeField
10 id="fiscalQuarter"
11 control={control}
12 label="Fiscal Period"
13 />
14 </div>
15 );
16}

Frequently Asked Questions & Quick Solutions

Architectural patterns, React 19 compatibility, and integration tips for DateRangeField.

How does DateRangeField integrate with Ant Design 5.x and Next.js 15?▼

DateRangeField is designed as an enhanced, declarative wrapper for Ant Design. It fully supports Next.js 15 App Router when using @ant-design/nextjs-registry, eliminating SSR hydration mismatches and guaranteeing 0ms layout thrashing.

Can I customize validation, themes, and props for DateRangeField?▼

Yes. Every prop is fully typed in TypeScript 5 with comprehensive Intellisense. You can pass custom styling via className or style props, configure global Ant Design themes via ConfigProvider, and extend validation logic seamlessly.