diff --git a/jquery.pickadate/jquery.pickadate.d.ts b/jquery.pickadate/jquery.pickadate.d.ts index 06c5ccdc94..08d789b53d 100644 --- a/jquery.pickadate/jquery.pickadate.d.ts +++ b/jquery.pickadate/jquery.pickadate.d.ts @@ -5,7 +5,24 @@ /// -interface pickadateOptions { +/** Options shared between date and time pickers */ +interface pickerOptions { + /** Set clear button text */ + clear?: string; // default 'Clear' + + /** Specify where to insert the picker's root element by passing any valid CSS selector to this option */ + container?: any; + + // Events + onStart?: (event: any) => void; + onRender?: (event: any) => void; + onOpen?: (event: any) => void; + onClose?: (event: any) => void; + onSet?: (event: any) => void; + onStop?: (event: any) => void; +} + +interface pickadateOptions extends pickerOptions { // Strings and translations monthsFull?: string[]; // default 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' monthsShort?: string[]; // default 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' @@ -16,7 +33,6 @@ interface pickadateOptions { // Buttons today?: string; // default 'Today' - clear?: string; // default 'Clear' // Formats format?: string; // default 'd mmmm, yyyy' @@ -37,17 +53,6 @@ interface pickadateOptions { // Disable dates disable?: any[]; // arrays formatted as [YEAR,MONTH,DATE] or integers representing days of the week (from 1 to 7). Switch to whitelist by setting first item in collection to `true`. - /** Specify where to insert the picker's root element by passing any valid CSS selector to this option */ - container?: any; - - // Events - onStart?: (event: any) => void; - onRender?: (event: any) => void; - onOpen?: (event: any) => void; - onClose?: (event: any) => void; - onSet?: (event: any) => void; - onStop?: (event: any) => void; - // Classes klass?: { @@ -108,9 +113,7 @@ interface pickadateOptions { } } -interface pickatimeOptions { - // Translations and clear button - clear?: string; // default 'Clear' +interface pickatimeOptions extends pickerOptions { // Formats format?: string; // default 'h:i A' @@ -128,17 +131,6 @@ interface pickatimeOptions { // Disable times disable?: any[]; // arrays formatted as [HOUR,MINUTE] or integers representing hours (from 0 to 23). Switch to whitelist by setting true as the first item in the collection. - /** Specify where to insert the picker's root element by passing any valid CSS selector to this option */ - container?: any; - - // Events - onStart?: (event: any) => void; - onRender?: (event: any) => void; - onOpen?: (event: any) => void; - onClose?: (event: any) => void; - onSet?: (event: any) => void; - onStop?: (event: any) => void; - // Classes klass?: {