jQuery UI: changeMonth and changeYear JSDoc

This commit is contained in:
John Reilly
2014-04-23 09:50:10 +01:00
parent 90a326d1fd
commit b03204e6f0
2 changed files with 50 additions and 1 deletions
+18
View File
@@ -1270,6 +1270,24 @@ function test_datepicker() {
// setter
var $set: JQuery = $(".selector").datepicker("option", "calculateWeek", myWeekCalc);
}
function changeMonth() {
$(".selector").datepicker({ changeMonth: true });
var changeMonth: boolean = $(".selector").datepicker("option", "changeMonth");
// setter
var $set: JQuery = $(".selector").datepicker("option", "changeMonth", true);
}
function changeYear() {
$(".selector").datepicker({ changeYear: true });
var changeYear: boolean = $(".selector").datepicker("option", "changeYear");
// setter
var $set: JQuery = $(".selector").datepicker("option", "changeYear", true);
}
}
+32 -1
View File
@@ -1287,10 +1287,41 @@ interface JQuery {
* @param methodName 'option'
* @param optionName 'buttonText'
* @param calculateWeekValue A function to calculate the week of the year for a given date. The default implementation uses the ISO 8601 definition: weeks start on a Monday; the first week of the year contains the first Thursday of the year.
*/
datepicker(methodName: 'option', optionName: 'calculateWeek', calculateWeekValue: (date: Date) => string): JQuery;
/**
* Get the changeMonth option, after initialization
*
* @param methodName 'option'
* @param optionName 'buttonText'
*/
datepicker(methodName: 'option', optionName: 'changeMonth'): boolean;
/**
* Set the changeMonth option, after initialization
*
* @param methodName 'option'
* @param optionName 'buttonText'
* @param changeMonthValue Whether the month should be rendered as a dropdown instead of text.
*/
datepicker(methodName: 'option', optionName: 'changeMonth', changeMonthValue: boolean): JQuery;
/**
* Get the changeYear option, after initialization
*
* @param methodName 'option'
* @param optionName 'buttonText'
*/
datepicker(methodName: 'option', optionName: 'changeYear'): boolean;
/**
* Set the changeYear option, after initialization
*
* @param methodName 'option'
* @param optionName 'buttonText'
* @param changeYearValue Whether the year should be rendered as a dropdown instead of text. Use the yearRange option to control which years are made available for selection.
*/
datepicker(methodName: 'option', optionName: 'changeYear', changeYearValue: boolean): JQuery;
/**
* Gets the value currently associated with the specified optionName.
*