From f1d0dcabb728013aa5dbbbc82f5f603de7d977e0 Mon Sep 17 00:00:00 2001 From: John Reilly Date: Wed, 23 Apr 2014 17:08:19 +0100 Subject: [PATCH] jQueryUI: Finished the c's --- jqueryui/jqueryui-tests.ts | 27 +++++++++++++++++++++ jqueryui/jqueryui.d.ts | 48 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) diff --git a/jqueryui/jqueryui-tests.ts b/jqueryui/jqueryui-tests.ts index e2aac42a09..136bb2c962 100644 --- a/jqueryui/jqueryui-tests.ts +++ b/jqueryui/jqueryui-tests.ts @@ -1288,6 +1288,33 @@ function test_datepicker() { // setter var $set: JQuery = $(".selector").datepicker("option", "changeYear", true); } + + function closeText() { + $(".selector").datepicker({ closeText: "Close" }); + + var closeText: string = $(".selector").datepicker("option", "closeText"); + + // setter + var $set: JQuery = $(".selector").datepicker("option", "closeText", "Close"); + } + + function constrainInput() { + $(".selector").datepicker({ constrainInput: false }); + + var constrainInput: boolean = $(".selector").datepicker("option", "constrainInput"); + + // setter + var $set: JQuery = $(".selector").datepicker("option", "constrainInput", false); + } + + function currentText() { + $(".selector").datepicker({ currentText: "Now" }); + + var currentText: string = $(".selector").datepicker("option", "currentText"); + + // setter + var $set: JQuery = $(".selector").datepicker("option", "currentText", "Now"); + } } diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index 2ccd2c262e..57f10c08ee 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -1322,6 +1322,54 @@ interface JQuery { */ datepicker(methodName: 'option', optionName: 'changeYear', changeYearValue: boolean): JQuery; + /** + * Get the closeText option, after initialization + * + * @param methodName 'option' + * @param optionName 'buttonText' + */ + datepicker(methodName: 'option', optionName: 'closeText'): string; + /** + * Set the closeText option, after initialization + * + * @param methodName 'option' + * @param optionName 'buttonText' + * @param closeTextValue The text to display for the close link. Use the showButtonPanel option to display this button. + */ + datepicker(methodName: 'option', optionName: 'closeText', closeTextValue: string): JQuery; + + /** + * Get the constrainInput option, after initialization + * + * @param methodName 'option' + * @param optionName 'buttonText' + */ + datepicker(methodName: 'option', optionName: 'constrainInput'): boolean; + /** + * Set the constrainInput option, after initialization + * + * @param methodName 'option' + * @param optionName 'buttonText' + * @param constrainInputValue When true, entry in the input field is constrained to those characters allowed by the current dateFormat option. + */ + datepicker(methodName: 'option', optionName: 'constrainInput', constrainInputValue: boolean): JQuery; + + /** + * Get the currentText option, after initialization + * + * @param methodName 'option' + * @param optionName 'buttonText' + */ + datepicker(methodName: 'option', optionName: 'currentText'): string; + /** + * Set the currentText option, after initialization + * + * @param methodName 'option' + * @param optionName 'buttonText' + * @param currentTextValue The text to display for the current day link. Use the showButtonPanel option to display this button. + */ + datepicker(methodName: 'option', optionName: 'currentText', currentTextValue: string): JQuery; + /** * Gets the value currently associated with the specified optionName. *