mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
jQuery UI: continued on option getters / setters
This commit is contained in:
@@ -1165,7 +1165,6 @@ function test_datepicker() {
|
||||
var $set: JQuery = $(".selector").datepicker("option", "altField", "#actualDate");
|
||||
}
|
||||
|
||||
// Options
|
||||
function altFormat() {
|
||||
$(".selector").datepicker({ altFormat: "yy-mm-dd" });
|
||||
|
||||
@@ -1176,6 +1175,25 @@ function test_datepicker() {
|
||||
var $set: JQuery = $(".selector").datepicker("option", "altFormat", "yy-mm-dd");
|
||||
}
|
||||
|
||||
function appendText() {
|
||||
$(".selector").datepicker({ appendText: "(yyyy-mm-dd)" });
|
||||
|
||||
// getter
|
||||
var appendText: string = $(".selector").datepicker("option", "appendText");
|
||||
|
||||
// setter
|
||||
var $set: JQuery = $(".selector").datepicker("option", "appendText", "(yyyy-mm-dd)");
|
||||
}
|
||||
|
||||
function autoSize() {
|
||||
$(".selector").datepicker({ autoSize: true });
|
||||
|
||||
// getter
|
||||
var autoSize: boolean = $(".selector").datepicker("option", "autoSize");
|
||||
|
||||
// setter
|
||||
var $set: JQuery = $(".selector").datepicker("option", "autoSize", true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
32
jqueryui/jqueryui.d.ts
vendored
32
jqueryui/jqueryui.d.ts
vendored
@@ -986,6 +986,38 @@ interface JQuery {
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'altFormat', altFormatValue: string): JQuery;
|
||||
|
||||
/**
|
||||
* Get the appendText option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'appendText'
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'appendText'): string;
|
||||
/**
|
||||
* Set the appendText option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'appendText'
|
||||
* @param appendTextValue The text to display after each date field, e.g., to show the required format.
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'appendText', appendTextValue: string): JQuery;
|
||||
|
||||
/**
|
||||
* Get the autoSize option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'autoSize'
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'autoSize'): boolean;
|
||||
/**
|
||||
* Set the autoSize option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'autoSize'
|
||||
* @param autoSizeValue Set to true to automatically resize the input field to accommodate dates in the current dateFormat.
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'autoSize', autoSizeValue: string): JQuery;
|
||||
|
||||
/**
|
||||
* Gets the value currently associated with the specified optionName.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user