mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
jQuery UI: started on option getters / setters
This commit is contained in:
@@ -1159,10 +1159,21 @@ function test_datepicker() {
|
||||
$(".selector").datepicker({ altField: "#actualDate" });
|
||||
|
||||
// getter
|
||||
var altField = $(".selector").datepicker("option", "altField");
|
||||
var altField: any = $(".selector").datepicker("option", "altField");
|
||||
|
||||
// setter
|
||||
$(".selector").datepicker("option", "altField", "#actualDate");
|
||||
var $set: JQuery = $(".selector").datepicker("option", "altField", "#actualDate");
|
||||
}
|
||||
|
||||
// Options
|
||||
function altFormat() {
|
||||
$(".selector").datepicker({ altFormat: "yy-mm-dd" });
|
||||
|
||||
// getter
|
||||
var altFormat: string = $(".selector").datepicker("option", "altFormat");
|
||||
|
||||
// setter
|
||||
var $set: JQuery = $(".selector").datepicker("option", "altFormat", "yy-mm-dd");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Vendored
+19
-3
@@ -952,7 +952,7 @@ interface JQuery {
|
||||
* @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;
|
||||
datepicker(methodName: 'option', optionName: 'altField', altFieldValue: string): JQuery;
|
||||
/**
|
||||
* Set the altField option, after initialization
|
||||
*
|
||||
@@ -960,7 +960,7 @@ interface JQuery {
|
||||
* @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;
|
||||
datepicker(methodName: 'option', optionName: 'altField', altFieldValue: JQuery): JQuery;
|
||||
/**
|
||||
* Set the altField option, after initialization
|
||||
*
|
||||
@@ -968,7 +968,23 @@ interface JQuery {
|
||||
* @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;
|
||||
datepicker(methodName: 'option', optionName: 'altField', altFieldValue: Element): JQuery;
|
||||
|
||||
/**
|
||||
* Get the altFormat option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'altFormat'
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'altFormat'): string;
|
||||
/**
|
||||
* Set the altFormat option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'altFormat'
|
||||
* @param altFormatValue 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: 'altFormat', altFormatValue: string): JQuery;
|
||||
|
||||
/**
|
||||
* Gets the value currently associated with the specified optionName.
|
||||
|
||||
Reference in New Issue
Block a user