@gpa-gemstone/react-forms
Version:
React Form modules for gpa webapps
49 lines (48 loc) • 1.38 kB
TypeScript
import { Gemstone } from '@gpa-gemstone/application-typings';
interface IProps<T> extends Gemstone.TSX.Interfaces.IBaseFormProps<T> {
/**
* Field representing the start date in the record
* @type {keyof T}
*/
FromField: keyof T;
/**
* Field representing the end date in the record
* @type {keyof T}
*/
ToField: keyof T;
/**
* Label to display for the form
* @type {string}
*/
Label: string;
/**
* Function to determine the validity of a field
* @param field - Field of the record to check
* @returns {boolean}
*/
Valid: (fieldFrom: keyof T, fieldTo: keyof T) => boolean;
/**
* Feedback message to show when input is invalid
* @type {string}
* @optional
*/
Feedback?: string;
/**
* Date format to use for the input fields
* @type {string}
* @optional
*/
Format?: string;
/**
* Value for the type attribute in input element, either 'datetime-local' or the default 'date'
* @type {'datetime-local' | 'date'}
* @optional
*/
Type?: ('datetime-local' | 'date');
}
/**
* DateRangePicker Component.
* Allows users to select a date range either by choosing predefined durations or by specifying custom dates.
*/
export default function DateRangePicker<T>(props: IProps<T>): JSX.Element;
export {};