diff --git a/jquery.timepicker/jquery.timepicker-tests.ts b/jquery.timepicker/jquery.timepicker-tests.ts index b74848aba7..26d64477aa 100644 --- a/jquery.timepicker/jquery.timepicker-tests.ts +++ b/jquery.timepicker/jquery.timepicker-tests.ts @@ -42,4 +42,7 @@ $('#timepicker').timepicker({ nowButtonText: 'Now', showDeselectButton: false, deselectButtonText: 'Deselect' -}); \ No newline at end of file +}); + +$().timepicker('getTime'); +$().timepicker('setTime', new Date()); \ No newline at end of file diff --git a/jquery.timepicker/jquery.timepicker.d.ts b/jquery.timepicker/jquery.timepicker.d.ts index 9aa4543fd2..92d121a670 100644 --- a/jquery.timepicker/jquery.timepicker.d.ts +++ b/jquery.timepicker/jquery.timepicker.d.ts @@ -25,9 +25,9 @@ interface TimePickerOptions { showOptions?: any; // Options for enhanced animations appendText?: string; // Display text following the input box, e.g. showing the format - beforeShow?: () => any; // Define a callback function executed before the timepicker is shown - onSelect?: () => any; // Define a callback function when a hour / minutes is selected - onClose?: () => any; // Define a callback function when the timepicker is closed + beforeShow?: () => any; // Define a callback function executed before the timepicker is shown + onSelect?: (timeText: string, inst: any) => any; // Define a callback function when a hour / minutes is selected + onClose?: (timeText: string, inst: any) => any; // Define a callback function when the timepicker is closed timeSeparator?: string; // The character to use to separate hours and minutes. periodSeparator?: string; // The character to use to separate the time from the time period. @@ -62,5 +62,9 @@ interface TimePickerOptions { interface JQuery { - timepicker(options?: TimePickerOptions): JQuery; + timepicker(): JQuery; + timepicker(options: TimePickerOptions): JQuery; + timepicker(methodName: string): JQuery; + timepicker(methodName: string, methodParameter: any): any; + timepicker(optionLiteral: string, optionName: string): any; }