tdesign-react
Version:
TDesign Component for React
27 lines (26 loc) • 969 B
TypeScript
import dayjs from 'dayjs';
import { CalendarCell } from './type';
export declare const blockName = "calendar";
export declare const controlSectionSize = "medium";
export declare const minYear = 1970;
/**
* 获取一个日期是周几(1~7)
*/
export declare const getDay: (dt: Date) => number;
/**
* 创建日历单元格数据
* @param year 日历年份
* @param month 日历月份
* @param firstDayOfWeek 周起始日(1~7)
* @param currentValue 当前日期
* @param format 日期格式
*/
export declare const createDateList: (year: number, month: number, firstDayOfWeek: number, currentValue: dayjs.Dayjs, format: string) => CalendarCell[][];
/**
* 创建月历单元格数据
* @param year 月历年份
* @param currentValue 当前日期
* @param format 输出格式
* @param rowNum 一行日历的个数
*/
export declare const createMonthList: (year: number, currentValue: dayjs.Dayjs, format: string, rowNum?: number) => CalendarCell[][];