2023-03-01 06:38:59 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Calendar also known as DatePicker, is a form component to work with dates.
|
|
|
|
*
|
|
|
|
* [Live Demo](https://www.primevue.org/calendar/)
|
|
|
|
*
|
|
|
|
* @module calendar
|
|
|
|
*
|
|
|
|
*/
|
2023-08-02 14:07:22 +00:00
|
|
|
import { HTMLAttributes, InputHTMLAttributes, TransitionProps, VNode } from 'vue';
|
2023-07-06 11:17:08 +00:00
|
|
|
import { ComponentHooks } from '../basecomponent';
|
2023-05-04 14:50:30 +00:00
|
|
|
import { ButtonPassThroughOptionType } from '../button';
|
2023-09-05 08:50:46 +00:00
|
|
|
import { PassThroughOptions } from '../passthrough';
|
2023-08-17 23:51:01 +00:00
|
|
|
import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-07-11 22:42:43 +00:00
|
|
|
export declare type CalendarPassThroughOptionType = CalendarPassThroughAttributes | ((options: CalendarPassThroughMethodOptions) => CalendarPassThroughAttributes | string) | string | null | undefined;
|
2023-05-04 14:50:30 +00:00
|
|
|
|
2023-08-02 14:07:22 +00:00
|
|
|
export declare type CalendarPassThroughTransitionType = TransitionProps | ((options: CalendarPassThroughMethodOptions) => TransitionProps) | undefined;
|
|
|
|
|
2023-05-04 14:50:30 +00:00
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) option method.
|
|
|
|
*/
|
|
|
|
export interface CalendarPassThroughMethodOptions {
|
2023-09-05 06:50:04 +00:00
|
|
|
/**
|
|
|
|
* Defines instance.
|
|
|
|
*/
|
2023-07-06 12:01:33 +00:00
|
|
|
instance: any;
|
2023-09-05 06:50:04 +00:00
|
|
|
/**
|
|
|
|
* Defines valid properties.
|
|
|
|
*/
|
2023-05-04 14:50:30 +00:00
|
|
|
props: CalendarProps;
|
2023-09-05 06:50:04 +00:00
|
|
|
/**
|
|
|
|
* Defines current inline state.
|
|
|
|
*/
|
2023-05-04 14:50:30 +00:00
|
|
|
state: CalendarState;
|
2023-09-05 06:50:04 +00:00
|
|
|
/**
|
|
|
|
* Defines current options.
|
|
|
|
*/
|
2023-07-31 06:18:21 +00:00
|
|
|
context: CalendarContext;
|
2023-09-05 08:50:46 +00:00
|
|
|
/**
|
|
|
|
* Defines passthrough(pt) options in global config.
|
|
|
|
*/
|
|
|
|
global: object | undefined;
|
2023-05-04 14:50:30 +00:00
|
|
|
}
|
|
|
|
|
2023-03-01 06:38:59 +00:00
|
|
|
/**
|
|
|
|
* Custom Calendar responsive options metadata.
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
export interface CalendarResponsiveOptions {
|
|
|
|
/**
|
|
|
|
* Breakpoint for responsive mode. Exp; @media screen and (max-width: ${breakpoint}) {...}
|
|
|
|
*/
|
|
|
|
breakpoint: string;
|
|
|
|
/**
|
|
|
|
* The number of visible months on breakpoint.
|
|
|
|
*/
|
|
|
|
numMonths: number;
|
|
|
|
}
|
|
|
|
|
2023-03-01 06:38:59 +00:00
|
|
|
/**
|
|
|
|
* Custom Calendar month change event.
|
2023-03-06 20:35:39 +00:00
|
|
|
* @see {@link CalendarEmits['month-change']]}
|
2023-03-01 06:38:59 +00:00
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
export interface CalendarMonthChangeEvent {
|
|
|
|
/**
|
|
|
|
* New month.
|
|
|
|
*/
|
|
|
|
month: number;
|
|
|
|
/**
|
|
|
|
* New year.
|
|
|
|
*/
|
|
|
|
year: number;
|
|
|
|
}
|
|
|
|
|
2023-03-01 06:38:59 +00:00
|
|
|
/**
|
|
|
|
* Custom Calendar year change event.
|
2023-03-06 20:35:39 +00:00
|
|
|
* @see {@link CalendarEmits['year-change']]}
|
2023-03-01 06:38:59 +00:00
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
export interface CalendarYearChangeEvent {
|
|
|
|
/**
|
|
|
|
* New month.
|
|
|
|
*/
|
|
|
|
month: number;
|
|
|
|
/**
|
|
|
|
* New year.
|
|
|
|
*/
|
|
|
|
year: number;
|
|
|
|
}
|
|
|
|
|
2023-03-01 06:38:59 +00:00
|
|
|
/**
|
|
|
|
* Custom Calendar blur event.
|
2023-03-06 20:35:39 +00:00
|
|
|
* @see {@link CalendarEmits.blur}
|
2023-03-01 06:38:59 +00:00
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
export interface CalendarBlurEvent {
|
|
|
|
/**
|
|
|
|
* Browser event
|
|
|
|
*/
|
|
|
|
originalEvent: Event;
|
|
|
|
/**
|
|
|
|
* Input value
|
|
|
|
*/
|
|
|
|
value: string;
|
|
|
|
}
|
|
|
|
|
2023-05-04 14:50:30 +00:00
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) options.
|
|
|
|
* @see {@link CalendarProps.pt}
|
|
|
|
*/
|
|
|
|
export interface CalendarPassThroughOptions {
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the root's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
root?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the input's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
input?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the Button component.
|
2023-05-04 14:50:30 +00:00
|
|
|
* @see {@link ButtonPassThroughOptionType}
|
|
|
|
*/
|
|
|
|
dropdownButton?: ButtonPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the panel's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
panel?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the group container's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
groupContainer?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the group's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
group?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the header's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
header?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the Button component.
|
2023-05-04 14:50:30 +00:00
|
|
|
* @see {@link ButtonPassThroughOptionType}
|
|
|
|
*/
|
|
|
|
previousButton?: ButtonPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the title's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
title?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the month title's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
monthTitle?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the year title's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
yearTitle?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the decade title's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
decadeTitle?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the Button component.
|
2023-05-04 14:50:30 +00:00
|
|
|
* @see {@link ButtonPassThroughOptionType}
|
|
|
|
*/
|
|
|
|
nextButton?: ButtonPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the container's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
container?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the table's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
table?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the table header's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
tableHeader?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the table header row's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
tableHeaderRow?: CalendarPassThroughOptionType;
|
2023-05-12 11:04:27 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the week header's DOM element.
|
2023-05-12 11:04:27 +00:00
|
|
|
*/
|
|
|
|
weekHeader?: CalendarPassThroughOptionType;
|
2023-05-04 14:50:30 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the table header cell's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
tableHeaderCell?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the week label's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
weekLabel?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the week day's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
weekDay?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the table body's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
tableBody?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the table body row's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
tableBodyRow?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the week number's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
weekNumber?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the week label container's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
weekLabelContainer?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the day's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
day?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the day label's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
dayLabel?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the month picker's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
monthPicker?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the month's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
month?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the year picker's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
yearPicker?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the year's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
year?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the time picker's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
timePicker?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the hour picker's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
hourPicker?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the hour's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
hour?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the separatorc ontainer's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
separatorContainer?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the separator's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
separator?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the minute picker's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
minutePicker?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the minute's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
minute?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the second picker's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
secondPicker?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the second's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
second?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the ampm picker's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
ampmPicker?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the ampm's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
ampm?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the buttonbar's DOM element.
|
2023-05-04 14:50:30 +00:00
|
|
|
*/
|
|
|
|
buttonbar?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the Button component.
|
2023-05-04 14:50:30 +00:00
|
|
|
* @see {@link ButtonPassThroughOptionType}
|
|
|
|
*/
|
|
|
|
todayButton?: ButtonPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the Button component.
|
2023-05-04 14:50:30 +00:00
|
|
|
* @see {@link ButtonPassThroughOptionType}
|
|
|
|
*/
|
|
|
|
clearButton?: ButtonPassThroughOptionType;
|
2023-07-06 13:54:38 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the aria selected day's DOM element.
|
2023-07-06 13:54:38 +00:00
|
|
|
*/
|
|
|
|
hiddenSelectedDay?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the aria month's DOM element.
|
2023-07-06 13:54:38 +00:00
|
|
|
*/
|
|
|
|
hiddenMonth?: CalendarPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the aria year's DOM element.
|
2023-07-06 13:54:38 +00:00
|
|
|
*/
|
|
|
|
hiddenYear?: CalendarPassThroughOptionType;
|
2023-07-06 11:09:01 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to manage all lifecycle hooks
|
2023-07-06 11:09:01 +00:00
|
|
|
* @see {@link BaseComponent.ComponentHooks}
|
|
|
|
*/
|
|
|
|
hooks?: ComponentHooks;
|
2023-08-02 11:59:53 +00:00
|
|
|
/**
|
|
|
|
* Used to control Vue Transition API.
|
|
|
|
*/
|
2023-08-02 14:07:22 +00:00
|
|
|
transition?: CalendarPassThroughTransitionType;
|
2023-05-04 14:50:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough attributes for each DOM elements
|
|
|
|
*/
|
|
|
|
export interface CalendarPassThroughAttributes {
|
|
|
|
[key: string]: any;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines current inline state in Calendar component.
|
|
|
|
*/
|
|
|
|
export interface CalendarState {
|
|
|
|
/**
|
|
|
|
* Current month as a number.
|
|
|
|
*/
|
|
|
|
currentMonth: number;
|
|
|
|
/**
|
|
|
|
* Current year as a number.
|
|
|
|
*/
|
|
|
|
currentYear: number;
|
|
|
|
/**
|
|
|
|
* Current hour as a number.
|
|
|
|
*/
|
|
|
|
currentHour: number;
|
|
|
|
/**
|
|
|
|
* Current minute as a number.
|
|
|
|
*/
|
|
|
|
currentMinute: number;
|
|
|
|
/**
|
|
|
|
* Current second as a number.
|
|
|
|
*/
|
|
|
|
currentSecond: number;
|
|
|
|
/**
|
|
|
|
* Current pm state as a boolean.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
pm: boolean;
|
|
|
|
/**
|
|
|
|
* Current focused state as a boolean.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
focused: boolean;
|
|
|
|
/**
|
|
|
|
* Current overlay visible state as a boolean.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
overlayVisible: boolean;
|
|
|
|
/**
|
|
|
|
* Current view state as a string.
|
|
|
|
* @defaultValue 'date'
|
|
|
|
*/
|
|
|
|
currentView: string;
|
|
|
|
}
|
|
|
|
|
2023-07-31 06:18:21 +00:00
|
|
|
/**
|
|
|
|
* Defines current options in Calendar component.
|
|
|
|
*/
|
|
|
|
export interface CalendarContext {
|
|
|
|
/**
|
|
|
|
* Current date.
|
|
|
|
*/
|
|
|
|
date: string | Date | string[] | Date[] | undefined | null;
|
|
|
|
/**
|
|
|
|
* Current today state of the calendar's day.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
today: boolean;
|
|
|
|
/**
|
|
|
|
* Current other month state of the calendar's day.
|
|
|
|
*/
|
|
|
|
otherMonth: boolean;
|
|
|
|
/**
|
|
|
|
* Current selected state of the calendar's day or month or year.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
selected: boolean;
|
|
|
|
/**
|
|
|
|
* Current disabled state of the calendar's day or month or year.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
disabled: boolean;
|
|
|
|
/**
|
|
|
|
* Current month state.
|
|
|
|
*/
|
|
|
|
month: CalendarMonthOptions;
|
|
|
|
/**
|
|
|
|
* Current month index state.
|
|
|
|
*/
|
|
|
|
monthIndex: number;
|
|
|
|
/**
|
|
|
|
* Current year state.
|
|
|
|
*/
|
|
|
|
year: CalendarYearOptions;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2023-09-05 09:14:08 +00:00
|
|
|
* Defines current month options.
|
2023-07-31 06:18:21 +00:00
|
|
|
*/
|
|
|
|
export interface CalendarMonthOptions {
|
|
|
|
/**
|
|
|
|
* Month value.
|
|
|
|
*/
|
|
|
|
value: string;
|
|
|
|
/**
|
|
|
|
* Selectable state of the month.
|
|
|
|
*/
|
|
|
|
selectable: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines current year options.
|
|
|
|
*/
|
|
|
|
export interface CalendarYearOptions {
|
|
|
|
/**
|
|
|
|
* Year value.
|
|
|
|
*/
|
|
|
|
value: number;
|
|
|
|
/**
|
|
|
|
* Selectable state of the month.
|
|
|
|
*/
|
|
|
|
selectable: boolean;
|
|
|
|
}
|
|
|
|
|
2023-03-01 06:38:59 +00:00
|
|
|
/**
|
|
|
|
* Defines valid properties in Calendar component.
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
export interface CalendarProps {
|
|
|
|
/**
|
|
|
|
* Value of the component.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue null
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
2023-03-01 06:38:59 +00:00
|
|
|
modelValue?: string | Date | string[] | Date[] | undefined | null;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
2023-03-01 06:38:59 +00:00
|
|
|
* Defines the quantity of the selection.
|
|
|
|
* @defaultValue single
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
2023-03-01 06:38:59 +00:00
|
|
|
selectionMode?: 'single' | 'multiple' | 'range' | undefined;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Format of the date. Defaults to PrimeVue Locale configuration.
|
|
|
|
*/
|
|
|
|
dateFormat?: string | undefined;
|
|
|
|
/**
|
|
|
|
* When enabled, displays the calendar as inline instead of an overlay.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
inline?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Whether to display dates in other months (non-selectable) at the start or end of the current month. To make these days selectable use the selectOtherMonths option.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue true
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
showOtherMonths?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Whether days in other months shown before or after the current month are selectable. This only applies if the showOtherMonths option is set to true.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
selectOtherMonths?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* When enabled, displays a button with icon next to input.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
showIcon?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Icon of the calendar button.
|
2023-04-18 12:03:17 +00:00
|
|
|
* @deprecated since v3.27.0. Use 'dropdownicon' slot.
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
icon?: string | undefined;
|
2022-12-08 11:04:25 +00:00
|
|
|
/**
|
|
|
|
* Icon to show in the previous button.
|
2023-04-18 07:37:05 +00:00
|
|
|
* @deprecated since v3.27.0. Use 'previousicon' slot.
|
2022-12-08 11:04:25 +00:00
|
|
|
*/
|
|
|
|
previousIcon?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Icon to show in the next button.
|
2023-04-18 07:37:05 +00:00
|
|
|
* @deprecated since v3.27.0. Use 'nexticon' slot.
|
2022-12-08 11:04:25 +00:00
|
|
|
*/
|
|
|
|
nextIcon?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Icon to show in each of the increment buttons.
|
2023-04-18 07:37:05 +00:00
|
|
|
* @deprecated since v3.27.0. Use 'incrementicon' slot.
|
2022-12-08 11:04:25 +00:00
|
|
|
*/
|
|
|
|
incrementIcon?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Icon to show in each of the decrement buttons.
|
2023-04-18 07:37:05 +00:00
|
|
|
* @deprecated since v3.27.0. Use 'decrementicon' slot.
|
2022-12-08 11:04:25 +00:00
|
|
|
*/
|
|
|
|
decrementIcon?: string | undefined;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Number of months to display.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue 1
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
numberOfMonths?: number | undefined;
|
|
|
|
/**
|
|
|
|
* An array of options for responsive design.
|
|
|
|
*/
|
|
|
|
responsiveOptions?: CalendarResponsiveOptions[];
|
|
|
|
/**
|
2023-03-01 06:38:59 +00:00
|
|
|
* Type of view to display.
|
2023-03-08 10:51:52 +00:00
|
|
|
* @defaultValue date
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
2023-03-01 06:38:59 +00:00
|
|
|
view?: 'date' | 'month' | 'year' | undefined;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* When enabled, calendar overlay is displayed as optimized for touch devices.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
touchUI?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Whether the month should be rendered as a dropdown instead of text.
|
|
|
|
*
|
|
|
|
* @deprecated since version 3.9.0, Navigator is always on.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
monthNavigator?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Whether the year should be rendered as a dropdown instead of text.
|
|
|
|
*
|
|
|
|
* @deprecated since version 3.9.0, Navigator is always on.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
yearNavigator?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* The range of years displayed in the year drop-down in (nnnn:nnnn) format such as (2000:2020).
|
|
|
|
*
|
|
|
|
* @deprecated since version 3.9.0, Years are based on decades by default.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
yearRange?: string | undefined;
|
|
|
|
/**
|
|
|
|
* The minimum selectable date.
|
|
|
|
*/
|
|
|
|
minDate?: Date | undefined;
|
|
|
|
/**
|
|
|
|
* The maximum selectable date.
|
|
|
|
*/
|
|
|
|
maxDate?: Date | undefined;
|
|
|
|
/**
|
|
|
|
* Array with dates to disable.
|
|
|
|
*/
|
|
|
|
disabledDates?: Date[] | undefined;
|
|
|
|
/**
|
|
|
|
* Array with disabled weekday numbers.
|
|
|
|
*/
|
|
|
|
disabledDays?: number[] | undefined;
|
|
|
|
/**
|
|
|
|
* Maximum number of selectable dates in multiple mode.
|
|
|
|
*/
|
|
|
|
maxDateCount?: number | undefined;
|
|
|
|
/**
|
|
|
|
* When disabled, datepicker will not be visible with input focus.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue true
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
showOnFocus?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Whether to automatically manage layering.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue true
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
autoZIndex?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Base zIndex value to use in layering.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue 0
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
baseZIndex?: number | undefined;
|
|
|
|
/**
|
|
|
|
* Whether to display today and clear buttons at the footer.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
showButtonBar?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* The cutoff year for determining the century for a date.
|
2023-03-08 10:51:52 +00:00
|
|
|
* @defaultValue +10
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
shortYearCutoff?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Whether to display timepicker.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
showTime?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Whether to display timepicker only.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
timeOnly?: boolean | undefined;
|
|
|
|
/**
|
2023-03-01 06:38:59 +00:00
|
|
|
* Specifies hour format.
|
|
|
|
* @defaultValue 24
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
2023-03-01 06:38:59 +00:00
|
|
|
hourFormat?: '12' | '24' | undefined;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Hours to change per step.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue 1
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
stepHour?: number | undefined;
|
|
|
|
/**
|
|
|
|
* Minutes to change per step.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue 1
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
stepMinute?: number | undefined;
|
|
|
|
/**
|
|
|
|
* Seconds to change per step.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue 1
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
stepSecond?: number | undefined;
|
|
|
|
/**
|
|
|
|
* Whether to show the seconds in time picker.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
showSeconds?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Whether to hide the overlay on date selection when showTime is enabled.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
hideOnDateTimeSelect?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Whether to hide the overlay on date selection is completed when selectionMode is range.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
hideOnRangeSelection?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Separator of time selector.
|
2023-03-08 10:51:52 +00:00
|
|
|
* @defaultValue :
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
timeSeparator?: string | undefined;
|
|
|
|
/**
|
|
|
|
* When enabled, calendar will show week numbers.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
showWeek?: boolean | undefined;
|
|
|
|
/**
|
2023-08-31 13:09:42 +00:00
|
|
|
* Whether to allow entering the date manually via typing.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue true
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
manualInput?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* When present, it specifies that the component should be disabled.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
disabled?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* When present, it specifies that an input field is read-only.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
readonly?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Placeholder text for the input.
|
|
|
|
*/
|
|
|
|
placeholder?: string | undefined;
|
|
|
|
/**
|
2023-03-01 06:38:59 +00:00
|
|
|
* A valid query selector or an HTMLElement to specify where the overlay gets attached.
|
2023-03-08 10:51:52 +00:00
|
|
|
* @defaultValue body
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
2023-03-01 06:38:59 +00:00
|
|
|
appendTo?: 'body' | 'self' | string | undefined | HTMLElement;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Identifier of the element.
|
|
|
|
*/
|
|
|
|
id?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Identifier of the underlying input element.
|
|
|
|
*/
|
|
|
|
inputId?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Inline style of the input field.
|
|
|
|
*/
|
2023-03-09 07:02:25 +00:00
|
|
|
inputStyle?: object | undefined;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Style class of the input field.
|
|
|
|
*/
|
2023-03-09 07:02:25 +00:00
|
|
|
inputClass?: string | object | undefined;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass all properties of the HTMLInputElement to the focusable input element inside the component.
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
inputProps?: InputHTMLAttributes | undefined;
|
|
|
|
/**
|
|
|
|
* Inline style of the overlay panel.
|
|
|
|
*/
|
2023-03-09 07:02:25 +00:00
|
|
|
panelStyle?: object | undefined;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Style class of the overlay panel.
|
|
|
|
*/
|
2023-03-09 07:02:25 +00:00
|
|
|
panelClass?: string | object | undefined;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass all properties of the HTMLDivElement to the overlay panel inside the component.
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
panelProps?: HTMLAttributes | undefined;
|
|
|
|
/**
|
|
|
|
* Establishes relationships between the component and label(s) where its value should be one or more element IDs.
|
|
|
|
*/
|
|
|
|
'aria-labelledby'?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Establishes a string value that labels the component.
|
|
|
|
*/
|
|
|
|
'aria-label'?: string | undefined;
|
2023-05-04 14:50:30 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to DOM elements inside the component.
|
2023-05-04 14:50:30 +00:00
|
|
|
* @type {CalendarPassThroughOptions}
|
|
|
|
*/
|
2023-08-17 23:51:01 +00:00
|
|
|
pt?: PTOptions<CalendarPassThroughOptions>;
|
2023-09-05 08:50:46 +00:00
|
|
|
/**
|
|
|
|
* Used to configure passthrough(pt) options of the component.
|
|
|
|
* @type {PassThroughOptions}
|
|
|
|
*/
|
|
|
|
ptOptions?: PassThroughOptions;
|
2023-05-22 08:31:53 +00:00
|
|
|
/**
|
|
|
|
* When enabled, it removes component related styles in the core.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
unstyled?: boolean;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
|
2023-03-01 06:38:59 +00:00
|
|
|
/**
|
|
|
|
* Defines valid slots in Calendar component.
|
|
|
|
*/
|
2023-03-01 08:50:09 +00:00
|
|
|
export interface CalendarSlots {
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Custom header template of panel.
|
|
|
|
*/
|
2023-03-01 06:38:59 +00:00
|
|
|
header(): VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Custom footer template of panel.
|
|
|
|
*/
|
2023-03-01 06:38:59 +00:00
|
|
|
footer(): VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Custom date template.
|
|
|
|
*/
|
2023-03-01 06:38:59 +00:00
|
|
|
date(scope: {
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Value of the component.
|
|
|
|
*/
|
2023-03-01 06:38:59 +00:00
|
|
|
date: { day: number; month: number; year: number; today: boolean; selectable: boolean };
|
|
|
|
}): VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Custom decade template.
|
|
|
|
*/
|
2023-03-01 06:38:59 +00:00
|
|
|
decade(scope: {
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* An array containing the start and and year of a decade to display at header of the year picker.
|
|
|
|
*/
|
|
|
|
years: string[] | undefined;
|
2023-03-01 06:38:59 +00:00
|
|
|
}): VNode[];
|
2023-04-06 08:19:46 +00:00
|
|
|
/**
|
2023-04-18 12:03:17 +00:00
|
|
|
* Custom dropdown icon template.
|
2023-04-06 08:19:46 +00:00
|
|
|
*/
|
2023-04-18 12:03:17 +00:00
|
|
|
dropdownicon(): VNode[];
|
2023-04-06 08:19:46 +00:00
|
|
|
/**
|
|
|
|
* Custom previous icon template.
|
2023-08-21 13:56:32 +00:00
|
|
|
* @param {Object} scope - previous icon slot's params.
|
2023-04-06 08:19:46 +00:00
|
|
|
*/
|
2023-08-21 13:56:32 +00:00
|
|
|
previousicon(scope: {
|
|
|
|
/**
|
|
|
|
* Style class of the dropdown icon
|
|
|
|
*/
|
|
|
|
class: any;
|
|
|
|
}): VNode[];
|
2023-04-06 08:19:46 +00:00
|
|
|
/**
|
|
|
|
* Custom next icon template.
|
2023-08-21 13:56:32 +00:00
|
|
|
* @param {Object} scope - next icon slot's params.
|
2023-04-06 08:19:46 +00:00
|
|
|
*/
|
2023-08-21 13:56:32 +00:00
|
|
|
nexticon(scope: {
|
|
|
|
/**
|
|
|
|
* Style class of the dropdown icon
|
|
|
|
*/
|
|
|
|
class: any;
|
|
|
|
}): VNode[];
|
2023-04-06 08:19:46 +00:00
|
|
|
/**
|
|
|
|
* Custom increment icon template.
|
2023-08-21 13:56:32 +00:00
|
|
|
* @param {Object} scope - increment icon slot's params.
|
2023-04-06 08:19:46 +00:00
|
|
|
*/
|
2023-08-21 13:56:32 +00:00
|
|
|
incrementicon(scope: {
|
|
|
|
/**
|
|
|
|
* Style class of the dropdown icon
|
|
|
|
*/
|
|
|
|
class: any;
|
|
|
|
}): VNode[];
|
2023-04-06 08:19:46 +00:00
|
|
|
/**
|
|
|
|
* Custom decrement icon template.
|
2023-08-21 13:56:32 +00:00
|
|
|
* @param {Object} scope - decrement icon slot's params.
|
2023-04-06 08:19:46 +00:00
|
|
|
*/
|
2023-08-21 13:56:32 +00:00
|
|
|
decrementicon(scope: {
|
|
|
|
/**
|
|
|
|
* Style class of the dropdown icon
|
|
|
|
*/
|
|
|
|
class: any;
|
|
|
|
}): VNode[];
|
2023-03-01 08:50:09 +00:00
|
|
|
}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-03-01 06:38:59 +00:00
|
|
|
/**
|
|
|
|
* Defines valid emits in Calendar component.
|
|
|
|
*/
|
|
|
|
export interface CalendarEmits {
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Emitted when the value changes.
|
2023-03-01 06:38:59 +00:00
|
|
|
* @param {string | Date | string[] | Date[] | undefined} value - New value.
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
2023-03-01 06:38:59 +00:00
|
|
|
'update:modelValue'(value: string | Date | string[] | Date[] | undefined): void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Callback to invoke when input field is being typed.
|
|
|
|
* @param {Event} event - Browser event
|
|
|
|
*/
|
2023-03-01 06:38:59 +00:00
|
|
|
input(event: Event): void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Callback to invoke when a date is selected.
|
|
|
|
* @param {Date} value - Selected value.
|
|
|
|
*/
|
2023-03-01 06:38:59 +00:00
|
|
|
'date-select'(value: Date): void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Callback to invoke when datepicker panel is shown.
|
|
|
|
*/
|
2023-03-01 06:38:59 +00:00
|
|
|
show(): void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Callback to invoke when datepicker panel is hidden.
|
|
|
|
*/
|
2023-03-01 06:38:59 +00:00
|
|
|
hide(): void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Callback to invoke when today button is clicked.
|
|
|
|
* @param {Date} date - Today as a date instance.
|
|
|
|
*/
|
2023-03-01 08:50:09 +00:00
|
|
|
'today-click'(date: Date): void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Callback to invoke when clear button is clicked.
|
|
|
|
* @param {Event} event - Browser event.
|
|
|
|
*/
|
2023-03-01 08:50:09 +00:00
|
|
|
'clear-click'(event: Event): void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Callback to invoke when a month is changed using the navigators.
|
|
|
|
* @param {CalendarMonthChangeEvent} event - Custom month change event.
|
|
|
|
*/
|
2023-03-01 08:50:09 +00:00
|
|
|
'month-change'(event: CalendarMonthChangeEvent): void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Callback to invoke when a year is changed using the navigators.
|
|
|
|
* @param {CalendarYearChangeEvent} event - Custom year change event.
|
|
|
|
*/
|
2023-03-01 08:50:09 +00:00
|
|
|
'year-change'(event: CalendarYearChangeEvent): void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Callback to invoke on focus of input field.
|
|
|
|
* @param {Event} event - Focus event
|
|
|
|
*/
|
2023-03-01 08:50:09 +00:00
|
|
|
focus(event: Event): void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Callback to invoke on blur of input field.
|
|
|
|
* @param {CalendarBlurEvent} event - Blur event
|
|
|
|
*/
|
2023-03-01 08:50:09 +00:00
|
|
|
blur(event: CalendarBlurEvent): void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Callback to invoke when a key is pressed.
|
|
|
|
*/
|
2023-03-01 08:50:09 +00:00
|
|
|
keydown(event: Event): void;
|
2023-03-01 06:38:59 +00:00
|
|
|
}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-03-01 06:38:59 +00:00
|
|
|
/**
|
|
|
|
* **PrimeVue - Calendar**
|
|
|
|
*
|
|
|
|
* _Calendar also known as DatePicker, is a form component to work with dates._
|
|
|
|
*
|
|
|
|
* [Live Demo](https://www.primevue.org/calendar/)
|
|
|
|
* --- ---
|
|
|
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
|
|
|
|
*
|
|
|
|
* @group Component
|
|
|
|
*/
|
2023-03-01 14:48:23 +00:00
|
|
|
declare class Calendar extends ClassComponent<CalendarProps, CalendarSlots, CalendarEmits> {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
|
|
|
declare module '@vue/runtime-core' {
|
|
|
|
interface GlobalComponents {
|
2022-09-14 11:26:01 +00:00
|
|
|
Calendar: GlobalComponentConstructor<Calendar>;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Calendar;
|