vuetning
Version:
<p align="center"> <img width="160"src="https://s3.amazonaws.com/arcthos.com/vuetning/logo.svg"> </p>
315 lines (314 loc) • 6.74 kB
TypeScript
import { PropType } from "vue";
import { ValidationError } from "../slds-form-element/validation-error";
import moment from "moment/min/moment-with-locales";
declare const _default: import("vue").DefineComponent<{
/**
* Indicates whether the datepicker is disabled.
*/
disabled: BooleanConstructor;
/**
* Array of error objects from vuelidate.
*/
errors: {
type: PropType<ValidationError[]>;
default: () => ValidationError[];
};
/**
* Inline help text.
* When using the help slot this prop is ignored.
*/
help: StringConstructor;
/**
* Picklist label.
*/
label: StringConstructor;
/**
* Locale.
*/
locale: {
type: StringConstructor;
default: string;
};
/**
* The value of the date picker.
*/
modelValue: DateConstructor;
/**
* Indicates whether this label's picklist is required.
*/
required: BooleanConstructor;
/**
* Indicates whether the picklist is stacked among other inputs.
*/
stacked: BooleanConstructor;
}, unknown, {
/**
* Calendar days.
*/
calendarDays: {
date: number;
isAdjacent: boolean;
}[][];
/**
* Current view.
*/
currentView: string;
/**
* Display date.
*/
displayDate: moment.Moment;
/**
* Valid date formats.
*/
formats: string[];
/**
* Input value.
*/
inputValue: string;
/**
* Indicates whether the dropdown is open.
*/
isOpen: boolean;
/**
* Month short names.
*/
monthShortNames: string[];
/**
* Selected date.
*/
selectedDate: string;
/**
* Selected month.
*/
selectedMonth: number;
/**
* Selected year.
*/
selectedYear: number;
/**
* Today.
*/
today: moment.Moment;
/**
* Views.
*/
views: {
calendar: string;
months: string;
years: string;
};
/**
* Year range start.
*/
yearRangeStart: number;
/**
* Year range end.
*/
yearRangeEnd: number;
}, {
/**
* The CSS class names for the container.
*/
containerClassNames(): string;
/**
* Formatted current month name.
*/
currentMonthName(): string;
/**
* Current year.
*/
currentYear(): number;
/**
* The animation name for the dropdown.
*/
dropdownAnimation(): string;
/**
* Bindable form element attributes.
*/
formElementAttributes(): Record<string, unknown>;
/**
* Month rows.
*/
monthRows(): Array<any>;
/**
* Indicates whether the input is showing its clear button.
*/
showClearButton(): boolean;
/**
* Year range header.
*/
yearRangeHeader(): string;
/**
* Year rows.
*/
yearRows(): Array<number>;
/**
* Formatted weekdays.
*/
weekDays(): Array<string>;
}, {
/**
* Clear the input.
*/
clearInput(): void;
/**
* Verifies if the day is selected.
* @param day
*/
dayIsSelected(day: {
date: number;
isAdjacent: boolean;
}): boolean;
/**
* Focus on input element.
*/
focusOnInputAsync(): Promise<void>;
/**
* Generate calendar days.
*/
generateCalendarDays(): void;
/**
* Handles the blur event on the input.
*/
handleBlur(event: Event): void;
/**
* Handles clicking the clear button.
*/
handleClickClear(): void;
/**
* Handles the click on a calendar day.
* @param day
*/
handleClickDay(day: {
date: number;
isAdjacent: boolean;
}): void;
/**
* Handles on click today button.
*/
handleClickToday(): void;
/**
* Handles the input event on the write input.
* @param event The fired event.
*/
handleInput(event: Event): void;
/**
* Handles the next month button.
*/
handleNextMonth(): void;
/**
* Handles the next year button.
*/
handleNextYear(): void;
/**
* Handles the next year range.
*/
handleNextYearRange(): void;
/**
* Handles the previous month button.
*/
handlePreviousMonth(): void;
/**
* Handles the previous year button.
*/
handlePreviousYear(): void;
/**
* Handles the previous year range.
*/
handlePreviousYearRange(): void;
/**
* Hides the dropdown.
*/
hideDropdown(): void;
/**
* Initializes the current year range.
*/
initYearRange(): void;
/**
* Verifies if the day is today.
* @param day
*/
isToday(day: {
date: number;
isAdjacent: boolean;
}): boolean;
/**
* Verifies if the month is selected.
* @param index
*/
isSelectedMonth(index: number): boolean;
/**
* Verifies if the year is selected.
* @param year
*/
isSelectedYear(year: number): boolean;
/**
* Select the clicked month.
* @param monthIndex
*/
selectMonth(monthIndex: number): void;
/**
* Select the clicked year.
* @param year
*/
selectYear(year: number): void;
/**
* Show the dropdown and set the display date.
*/
showDropdown(): void;
/**
* Switch the view to month.
*/
switchToMonthView(): void;
/**
* Switch the view to year.
*/
switchToYearView(): void;
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
/**
* Indicates whether the datepicker is disabled.
*/
disabled: BooleanConstructor;
/**
* Array of error objects from vuelidate.
*/
errors: {
type: PropType<ValidationError[]>;
default: () => ValidationError[];
};
/**
* Inline help text.
* When using the help slot this prop is ignored.
*/
help: StringConstructor;
/**
* Picklist label.
*/
label: StringConstructor;
/**
* Locale.
*/
locale: {
type: StringConstructor;
default: string;
};
/**
* The value of the date picker.
*/
modelValue: DateConstructor;
/**
* Indicates whether this label's picklist is required.
*/
required: BooleanConstructor;
/**
* Indicates whether the picklist is stacked among other inputs.
*/
stacked: BooleanConstructor;
}>>, {
required: boolean;
disabled: boolean;
errors: ValidationError[];
stacked: boolean;
locale: string;
}, {}>;
export default _default;