mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
jQueryUI: started adding option overloads
This commit is contained in:
@@ -1153,6 +1153,18 @@ function test_datepicker() {
|
||||
var $setDate2: JQuery = $(".selector").datepicker("setDate", new Date());
|
||||
var $shown: JQuery = $(".selector").datepicker("show");
|
||||
var $widget: JQuery = $(".selector").datepicker("widget");
|
||||
|
||||
// Options
|
||||
function altField() {
|
||||
$(".selector").datepicker({ altField: "#actualDate" });
|
||||
|
||||
// getter
|
||||
var altField = $(".selector").datepicker("option", "altField");
|
||||
|
||||
// setter
|
||||
$(".selector").datepicker("option", "altField", "#actualDate");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
49
jqueryui/jqueryui.d.ts
vendored
49
jqueryui/jqueryui.d.ts
vendored
@@ -905,13 +905,6 @@ interface JQuery {
|
||||
* @param methodName 'isDisabled'
|
||||
*/
|
||||
datepicker(methodName: 'isDisabled'): boolean;
|
||||
/**
|
||||
* Gets the value currently associated with the specified optionName.
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName The name of the option to get.
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: string): any;
|
||||
/**
|
||||
* Redraw the date picker, after having made some external modifications.
|
||||
*
|
||||
@@ -945,6 +938,48 @@ interface JQuery {
|
||||
*/
|
||||
datepicker(methodName: 'widget'): JQuery;
|
||||
|
||||
/**
|
||||
* Get the altField option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'altField'
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'altField'): any;
|
||||
/**
|
||||
* Set the altField option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'altField'
|
||||
* @param altFieldValue An input element that is to be updated with the selected date from the datepicker. Use the altFormat option to change the format of the date within this field. Leave as blank for no alternate field.
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'altField', altFieldValue: string): any;
|
||||
/**
|
||||
* Set the altField option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'altField'
|
||||
* @param altFieldValue An input element that is to be updated with the selected date from the datepicker. Use the altFormat option to change the format of the date within this field. Leave as blank for no alternate field.
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'altField', altFieldValue: JQuery): any;
|
||||
/**
|
||||
* Set the altField option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'altField'
|
||||
* @param altFieldValue An input element that is to be updated with the selected date from the datepicker. Use the altFormat option to change the format of the date within this field. Leave as blank for no alternate field.
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'altField', altFieldValue: Element): any;
|
||||
|
||||
/**
|
||||
* Gets the value currently associated with the specified optionName.
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName The name of the option to get.
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: string): any;
|
||||
|
||||
datepicker(methodName: 'option', optionName: string, ...otherParams: any[]): any; // Used for getting and setting options
|
||||
|
||||
datepicker(methodName: string, ...otherParams: any[]): any;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user