jiaqingjiayi-xiaochengxu/甲情_甲意/miniprogram/node_modules/antd-mini/less/DatePicker/props.d.ts

100 lines
2.0 KiB
TypeScript
Raw Normal View History

2024-11-10 07:01:22 +00:00
import { IBaseProps } from '../_base';
export type PickerValue = Date;
/**
* @description
*/
export interface IDatePickerProps extends IBaseProps {
/**
* @description YYYY-MM-DD
*/
format: string;
/**
* @description
* @default
*/
min?: Date;
/**
* @description
* @default
*/
max?: Date;
/**
* @description
*/
value: PickerValue;
/**
* @description
*/
defaultValue: PickerValue;
/**
* @description
*/
title?: string;
/**
* @description
* @default "确定"
*/
okText?: string;
/**
* @description
* @default "取消"
*/
cancelText?: string;
/**
* @description
* @default '请选择'
*/
placeholder?: string;
/**
* @description
* @default false
*/
controlled?: boolean;
/**
* @description
*/
onOk?: (date: PickerValue, dateStr: string, e: Record<string, any>) => void;
/**
* @description
*/
onCancel?: (e: Record<string, any>) => void;
/**
* @description onChange ok
*/
onPickerChange?: (
date: PickerValue,
dateStr: string,
e: Record<string, any>
) => void;
/**
* @description
* @default 'day'
*/
precision: 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second';
// | 'week'
// | 'week-day';
/**
* @description
*/
onFormat?: (date: PickerValue, dateStr: string) => string;
/**
* @description
*/
onVisibleChange?: (visible, e: Record<string, any>) => void;
/**
* @description
* @default false
*/
maskClosable?: boolean;
/**
* @description
*/
popClassName?: string;
/**
* @description
*/
popStyle?: string;
}
export declare const DatePickerDefaultProps: Partial<IDatePickerProps>;