diff --git a/jquery.timepicker/jquery.timepicker.d.ts b/jquery.timepicker/jquery.timepicker-0.3.d.ts similarity index 95% rename from jquery.timepicker/jquery.timepicker.d.ts rename to jquery.timepicker/jquery.timepicker-0.3.d.ts index 2c8e0bcde2..26b837bb5d 100644 --- a/jquery.timepicker/jquery.timepicker.d.ts +++ b/jquery.timepicker/jquery.timepicker-0.3.d.ts @@ -1,4 +1,4 @@ -// Type definitions for jQuery UI Timepicker 0.3.1 +// Type definitions for jQuery UI Timepicker 0.3 // Project: http://fgelinas.com/code/timepicker/ // Definitions by: https://github.com/anwarjaved // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -22,7 +22,7 @@ interface TimePickerOptions { // 'button' for trigger button, or 'both' for either (not yet implemented) button?: string; // 'button' element that will trigger the timepicker showAnim?: string; // Name of jQuery animation for popup - showOptions: any; // Options for enhanced animations + 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 diff --git a/jquery.timepicker/jquery.timepicker-tests.ts b/jquery.timepicker/jquery.timepicker-tests.ts new file mode 100644 index 0000000000..5a979fc262 --- /dev/null +++ b/jquery.timepicker/jquery.timepicker-tests.ts @@ -0,0 +1,45 @@ +/// +/// + +var beforeShowCallback, onSelectCallback, onCloseCallback, onHourShow, onMinuteShow; +$('#timepicker').timepicker({ + timeSeparator: ':', + showLeadingZero: true, + showMinutesLeadingZero: true, + showPeriod: false, + showPeriodLabels: true, + periodSeparator: ' ', + altField: '#alternate_input', + defaultTime: '12:34', + showOn: 'focus', + button: null, + hourText: 'Hour', + minuteText: 'Minute', + amPmText: ['AM', 'PM'], + + myPosition: 'left top', + atPosition: 'left bottom', + beforeShow: beforeShowCallback, + onSelect: onSelectCallback, + onClose: onCloseCallback, + onHourShow: onHourShow, + onMinuteShow: onMinuteShow, + hours: { + starts: 0, + ends: 23 + }, + minutes: { + starts: 0, + ends: 55, + interval: 5 + }, + rows: 4, + showHours: true, + showMinutes: true, + showCloseButton: false, + closeButtonText: 'Done', + showNowButton: false, + nowButtonText: 'Now', + showDeselectButton: false, + deselectButtonText: 'Deselect' +}); \ No newline at end of file