New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/vanillajs-datepicker

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/vanillajs-datepicker - npm Package Compare versions

Comparing version 1.2.2 to 1.3.0

61

vanillajs-datepicker/Datepicker.d.ts
import DateRangePicker from './DateRangePicker';
export interface DatepickerOptionsFormat {
toValue: (date: Date, format: object, locale: object) => string;
toValue: (date: Date, format: object, locale: object) => Date | number;
toDisplay: (date: Date, format: object, locale: object) => string;
}
export interface DatepickerOptionsShortcutKeysDefinition {
key?: string;
ctrlOrMetaKey?: boolean;
ctrlKey?: boolean;
metaKey?: boolean;
altKey?: boolean;
shiftKey?: boolean;
}
export interface DatepickerOptionsShortcutKeys {
show?: DatepickerOptionsShortcutKeysDefinition;
hide?: null;
toggle?: DatepickerOptionsShortcutKeysDefinition;
prevButton?: DatepickerOptionsShortcutKeysDefinition;
nextButton?: DatepickerOptionsShortcutKeysDefinition;
viewSwitch?: DatepickerOptionsShortcutKeysDefinition;
clearButton?: DatepickerOptionsShortcutKeysDefinition;
todayButton?: DatepickerOptionsShortcutKeysDefinition;
exitEditMode?: DatepickerOptionsShortcutKeysDefinition;
}
export type DatepickerOptionsOrientationVertical = 'top' | 'middle' | 'bottom' | 'auto';

@@ -22,3 +43,3 @@ export type DatepickerOptionsOrientationHorizontal = 'left' | 'center' | 'right' | 'auto';

calendarWeeks?: boolean;
clearBtn?: boolean;
clearButton?: boolean;
container?: string | HTMLElement;

@@ -29,4 +50,5 @@ dateDelimiter?: string;

daysOfWeekHighlighted?: number[];
defaultViewDate?: string | Date | number ;
format?: string | DatepickerOptionsFormat ;
defaultViewDate?: string | Date | number;
enableOnReadonly?: boolean;
format?: string | DatepickerOptionsFormat;
language?: string;

@@ -38,6 +60,6 @@ maxDate?: string | Date | number;

nextArrow?: string;
prevArrow?: string;
orientation?: DatepickerOptionsOrientation;
pickLevel?: number;
prevArray?: string;
prevArrow?: string;
shortcutKeys?: DatepickerOptionsShortcutKeys;
showDaysOfWeek?: boolean;

@@ -48,6 +70,7 @@ showOnClick?: boolean;

title?: string;
todayBtn?: boolean;
todayBtnMode?: number;
todayButton?: boolean;
todayButtonMode?: number;
todayHighlight?: boolean;
updateOnBlur?: boolean;
weekNumbers?: number | ((date: Date, weekStart: number) => number);
weekStart?: number;

@@ -57,18 +80,15 @@ }

export default class Datepicker {
static formatDate(date: Date | number, format: string, lang?: string): string;
static parseDate(dateStr: string | Date | number, format: string, lang?: string): number;
static get locales(): object;
constructor(element: HTMLElement, options?: DatepickerOptions, rangepicker?: DateRangePicker);
element: HTMLElement;
dates: any;
config: DatepickerOptions;
dates: any;
inputField: any;
editMode: boolean;
element: HTMLElement;
inline: boolean;
inputField: any;
picker: any;
_options: object;
_showing: boolean;
static formatDate(date: Date | number, format: string, lang?: string): string;
static parseDate(dateStr: string | Date | number, format: string, lang?: string): number;
static get locales(): object;
get active(): boolean;

@@ -91,3 +111,6 @@ get pickerElement(): HTMLElement | undefined;

refresh(forceRender?: boolean): void;
getFocusedDate(format?: string): Date | string;
setFocusedDate(viewDate?: Date | number | string, resetView?: boolean): void;
refresh(target?: 'picker' | 'input', forceRender?: boolean): void;

@@ -94,0 +117,0 @@

import Datepicker from './Datepicker';
export interface DateRangePickerOptions {
allowOneSidedRange?: boolean;
inputs?: HTMLElement[];
allowOneSidedRange?: boolean;
language?: string;
format?: string;
}
export default class DateRangePicker {

@@ -25,3 +24,2 @@ constructor(element: HTMLElement, options?: DateRangePickerOptions);

setDates(rangeStart: Date | number | string | object, rangeEnd: Date | number | string | object): void;
_updating: boolean;
}

@@ -1,9 +0,9 @@

// Type definitions for vanillajs-datepicker 1.2
// Type definitions for vanillajs-datepicker 1.3
// Project: https://github.com/mymth/vanillajs-datepicker
// Definitions by: Paul Adams <https://github.com/nihaopaul>
// Definitions by: Paul Adams <https://github.com/nihaopaul>, Romain Monteil <https://github.com/ker0x>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 4.1
import Datepicker from "./Datepicker";
import DateRangePicker from "./DateRangePicker";
import Datepicker from './Datepicker';
import DateRangePicker from './DateRangePicker';
export { Datepicker, DateRangePicker };
{
"name": "@types/vanillajs-datepicker",
"version": "1.2.2",
"version": "1.3.0",
"description": "TypeScript definitions for vanillajs-datepicker",

@@ -12,2 +12,7 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/vanillajs-datepicker",

"githubUsername": "nihaopaul"
},
{
"name": "Romain Monteil",
"url": "https://github.com/ker0x",
"githubUsername": "ker0x"
}

@@ -24,4 +29,4 @@ ],

"dependencies": {},
"typesPublisherContentHash": "87090a3cd9f0d6b91a647b89921b88f2793d87e1da00277ec7d73bc81db22ad0",
"typeScriptVersion": "4.3"
"typesPublisherContentHash": "52f686b090235a347415d2d25c45cdb83a583be27c8fb50d979c6f58f3bd2cbf",
"typeScriptVersion": "4.5"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Sun, 23 Apr 2023 08:32:48 GMT
* Last updated: Thu, 14 Sep 2023 04:55:25 GMT
* Dependencies: none

@@ -17,2 +17,2 @@ * Global values: none

# Credits
These definitions were written by [Paul Adams](https://github.com/nihaopaul).
These definitions were written by [Paul Adams](https://github.com/nihaopaul), and [Romain Monteil](https://github.com/ker0x).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc