Update definition and tests for pickadate.js v3.2.0

This commit is contained in:
Theodore Brown
2013-08-15 23:28:36 -05:00
parent 8220ab27e7
commit 030121e8b3
2 changed files with 29 additions and 5 deletions
@@ -99,6 +99,10 @@ $('.datepicker').pickadate({
]
});
$('.datepicker').pickadate({
container: '#root-outlet'
});
$('.datepicker').pickadate({
onStart: function () {
console.log('Hello there :)')
@@ -189,6 +193,10 @@ $('.timepicker').pickatime({
]
});
$('.timepicker').pickatime({
container: '#root-outlet'
});
$('.timepicker').pickatime({
onStart: function () {
console.log('Hello there :)')
+21 -5
View File
@@ -1,4 +1,4 @@
// Type definitions for pickadate.js 3.0.5
// Type definitions for pickadate.js 3.2.0
// Project: https://github.com/amsul/pickadate.js
// Definitions by: Theodore Brown <https://github.com/theodorejb/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -37,6 +37,9 @@ 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;
@@ -125,6 +128,9 @@ 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;
@@ -241,8 +247,13 @@ interface DatePickerObject extends PickerObject {
/** Destroy the picker. */
stop(): DatePickerObject;
/** Refresh the picker after adding something to the holder. */
render(): DatePickerObject;
/**
* Refresh the picker box after adding something to the holder.
* By default, only the "face" of the picker (i.e. the box element)
* has its contents re-rendered. To render the entire picker from
* the root up, pass true as the first argument.
*/
render(entirePicker?: boolean): DatePickerObject;
/** Clear the value in the picker's input element. */
clear(): DatePickerObject;
@@ -307,8 +318,13 @@ interface TimePickerObject extends PickerObject {
/** Destroy the picker. */
stop(): TimePickerObject;
/** Refresh the picker after adding something to the holder. */
render(): TimePickerObject;
/**
* Refresh the picker box after adding something to the holder.
* By default, only the "face" of the picker (i.e. the box element)
* has its contents re-rendered. To render the entire picker from
* the root up, pass true as the first argument.
*/
render(entirePicker?: boolean): TimePickerObject;
/** Clear the value in the picker's input element. */
clear(): TimePickerObject;