DefinitelyTyped/types/vue2-datepicker/index.d.ts
Christian Stornowski 60ecb72de2 Updated to newest vue js and vue2-datepicker version (#37296)
* Updated to newest vue js and vue2-datepicker version
Added test for vue-class-component with decorators

* Moved wrong dependencies to devDependencies

* Removed devDependencies

* Added correct typescript version

* Fixed building issues

* Fixed building issues

* Fixed building issues

* Lowered typescript version

* Change to Version 3.2
2019-08-05 10:55:38 -07:00

75 lines
1.9 KiB
TypeScript

// Type definitions for vue2-datepicker 2.12
// Project: https://github.com/mengxiong10/vue2-datepicker
// Definitions by: ChristianStornowski <https://github.com/ChristianStornowski>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.2
import { Component } from "vue/types/options";
declare namespace Datepicker {
interface Shortcuts {
text: string;
onClick: () => any;
}
interface TimePickerOptions {
start: string;
step: string;
end: string;
}
interface Lang {
days: string[];
months: string[];
pickers: string[];
placeholder: {
date: string;
dateRange: string;
};
}
interface ValueType {
date: Date;
timestamp: number;
format: string;
}
interface TimeSelectOptions {
hours: number[];
minutes: number[];
seconds: number[];
}
}
declare const Datepicker: Component<any, any, any, {
type?: string;
range?: boolean;
format?: string;
valueType?: Datepicker.ValueType;
lang?: string | Datepicker.Lang;
clearable?: boolean;
confirm?: boolean;
editable?: boolean;
disabled?: boolean;
placeholder?: string;
width?: number | string;
appendToBody?: boolean;
defaultValue?: string;
popupStyle?: string;
notBefore?: string | Date;
notAfter?: string | Date;
disabledDays?: number[] | string[] | ((date: Date) => Date[]);
shortcuts?: boolean | Datepicker.Shortcuts[]
timePickerOptions?: Datepicker.TimePickerOptions[] | (() => Datepicker.TimePickerOptions[]);
timeSelectOptions?: Datepicker.TimeSelectOptions;
minuteStep?: number;
firstDayOfWeek?: number;
inputClass?: string;
inputAttr?: string;
confirmText?: string;
rangeSeparator?: string;
dateFormat?: string;
}>;
export default Datepicker;