packages/ag-grid-docs/src/dist/aui/js/aui-datepicker.js
/* Date picker manager.
     Use the singleton instance of this class, $.datepicker, to interact with the date picker.
     Settings for (groups of) date pickers are maintained in an instance object,
     allowing multiple different settings on the same page. */
Date picker manager.
Use the singleton instance of this class, $.datepicker, to interact with the date picker.
Settings for (groups of) date pickers are maintained in an instance object,
allowing multiple different settings on the same page.
Date picker manager . Use the singleton instance of this class $ . datepicker to interact with the date picker . Settings for ( groups of ) date pickers are maintained in an instance object allowing multiple different settings on the same page .
function Datepicker() {
  	this.debug = false; 
  	this._curInst = null; 
  	this._keyEvent = false; 
  	this._disabledInputs = []; 
  	this._datepickerShowing = false; 
  	this._inDialog = false; 
  	this._mainDivId = 'ui-datepicker-div'; 
  	this._inlineClass = 'ui-datepicker-inline'; 
  	this._appendClass = 'ui-datepicker-append'; 
  	this._triggerClass = 'ui-datepicker-trigger'; 
  	this._dialogClass = 'ui-datepicker-dialog'; 
  	this._disableClass = 'ui-datepicker-disabled'; 
  	this._unselectableClass = 'ui-datepicker-unselectable'; 
  	this._currentClass = 'ui-datepicker-current-day'; 
  	this._dayOverClass = 'ui-datepicker-days-cell-over'; 
  	this.regional = []; 
  	this.regional[''] = { 
  		closeText: 'Done', 
  		prevText: 'Prev', 
  		nextText: 'Next', 
  		currentText: 'Today', 
  		monthNames: ['January','February','March','April','May','June',
  			'July','August','September','October','November','December'], 
  		monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], 
  		dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], 
  		dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], 
  		dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], 
  		weekHeader: 'Wk', 
  		dateFormat: 'mm/dd/yy', 
  		firstDay: 0, 
  		isRTL: false, 
  		showMonthAfterYear: false, 
  		yearSuffix: '' 
  	};
  	this._defaults = { 
  		showOn: 'focus', 
  		showAnim: 'fadeIn', 
  		showOptions: {}, 
  		defaultDate: null, 
  		appendText: '', 
  		buttonText: '...', 
  		buttonImage: '', 
  		buttonImageOnly: false, 
  		hideIfNoPrevNext: false, 
  		navigationAsDateFormat: false, 
  		gotoCurrent: false, 
  		changeMonth: false, 
  		changeYear: false, 
  		yearRange: 'c-10:c+10', 
  		showOtherMonths: false, 
  		selectOtherMonths: false, 
  		showWeek: false, 
  		calculateWeek: this.iso8601Week, 
  		shortYearCutoff: '+10', 
  		minDate: null, 
  		maxDate: null, 
  		duration: 'fast', 
  		beforeShowDay: null, 
  		beforeShow: null, 
  		onSelect: null, 
  		onChangeMonthYear: null, 
  		onClose: null, 
  		numberOfMonths: 1, 
  		showCurrentAtPos: 0, 
  		stepMonths: 1, 
  		stepBigMonths: 12,  for the big links
  		altField: '', 
  		altFormat: '', 
  		constrainInput: true, 
  		showButtonPanel: false, 
  		autoSize: false, 
  		disabled: false 
  	};
  	$.extend(this._defaults, this.regional['']);
  	this.dpDiv = bindHover($('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'));
  }
function Datepicker ( ) { this . debug = false ; this . _curInst = null ; this . _keyEvent = false ; this . _disabledInputs = [ ] ; this . _datepickerShowing = false ; this . _inDialog = false ; this . _mainDivId = 'ui-datepicker-div' ; this . _inlineClass = 'ui-datepicker-inline' ; this . _appendClass = 'ui-datepicker-append' ; this . _triggerClass = 'ui-datepicker-trigger' ; this . _dialogClass = 'ui-datepicker-dialog' ; this . _disableClass = 'ui-datepicker-disabled' ; this . _unselectableClass = 'ui-datepicker-unselectable' ; this . _currentClass = 'ui-datepicker-current-day' ; this . _dayOverClass = 'ui-datepicker-days-cell-over' ; this . regional = [ ] ; this . regional [ '' ] = { closeText : 'Done' , prevText : 'Prev' , nextText : 'Next' , currentText : 'Today' , monthNames : [ 'January' , 'February' , 'March' , 'April' , 'May' , 'June' , 'July' , 'August' , 'September' , 'October' , 'November' , 'December' ] , monthNamesShort : [ 'Jan' , 'Feb' , 'Mar' , 'Apr' , 'May' , 'Jun' , 'Jul' , 'Aug' , 'Sep' , 'Oct' , 'Nov' , 'Dec' ] , dayNames : [ 'Sunday' , 'Monday' , 'Tuesday' , 'Wednesday' , 'Thursday' , 'Friday' , 'Saturday' ] , dayNamesShort : [ 'Sun' , 'Mon' , 'Tue' , 'Wed' , 'Thu' , 'Fri' , 'Sat' ] , dayNamesMin : [ 'Su' , 'Mo' , 'Tu' , 'We' , 'Th' , 'Fr' , 'Sa' ] , weekHeader : 'Wk' , dateFormat : 'mm/dd/yy' , firstDay : 0 , isRTL : false , showMonthAfterYear : false , yearSuffix : '' } ; this . _defaults = { showOn : 'focus' , showAnim : 'fadeIn' , showOptions : { } , defaultDate : null , appendText : '' , buttonText : '...' , buttonImage : '' , buttonImageOnly : false , hideIfNoPrevNext : false , navigationAsDateFormat : false , gotoCurrent : false , changeMonth : false , changeYear : false , yearRange : 'c-10:c+10' , showOtherMonths : false , selectOtherMonths : false , showWeek : false , calculateWeek : this . iso8601Week , shortYearCutoff : '+10' , minDate : null , maxDate : null , duration : 'fast' , beforeShowDay : null , beforeShow : null , onSelect : null , onChangeMonthYear : null , onClose : null , numberOfMonths : 1 , showCurrentAtPos : 0 , stepMonths : 1 , stepBigMonths : 12 , altField : '' , altFormat : '' , constrainInput : true , showButtonPanel : false , autoSize : false , disabled : false } ; $ . extend ( this . _defaults , this . regional [ '' ] ) ; this . dpDiv = bindHover ( $ ( '<div id="' + this . _mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>' ) ) ; }
Date picker manager.
Date picker manager .
// Change this to true to start debugging // The current instance in use // If the last event was a key event // List of date picker inputs that have been disabled // True if the popup picker is showing , false if not // True if showing within a "dialog", false if not // The ID of the main datepicker division // The name of the inline marker class // The name of the append marker class // The name of the trigger marker class // The name of the dialog marker class // The name of the disabled covering marker class // The name of the unselectable cell marker class // The name of the current day marker class // The name of the day hover marker class // Available regional settings, indexed by language code // Default regional settings // Display text for close link // Display text for previous month link // Display text for next month link // Display text for current month link // Names of months for drop-down and formatting // For formatting // For formatting // For formatting // Column headings for days starting at Sunday // Column header for week of the year // See format options on parseDate // The first day of the week, Sun = 0, Mon = 1, ... // True if right-to-left language, false if left-to-right // True if the year select precedes month, false for month then year // Additional text to append to the year in the month headers // Global defaults for all the date picker instances // 'focus' for popup on focus, // 'button' for trigger button, or 'both' for either // Name of jQuery animation for popup // Options for enhanced animations // Used when field is blank: actual date, // +/-number for offset from today, null for today // Display text following the input box, e.g. showing the format // Text for trigger button // URL for trigger button image // True if the image appears alone, false if it appears on a button // True to hide next/previous month links // if not applicable, false to just disable them // True if date formatting applied to prev/today/next links // True if today link goes back to current selection instead // True if month can be selected directly, false if only prev/next // True if year can be selected directly, false if only prev/next // Range of years to display in drop-down, // either relative to today's year (-nn:+nn), relative to currently displayed year // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n) // True to show dates in other months, false to leave blank // True to allow selection of dates in other months, false for unselectable // True to show week of the year, false to not show it // How to calculate the week of the year, // takes a Date and returns the number of the week for it // Short year values < this are in the current century, // > this are in the previous century, // string value starting with '+' for current year + value // The earliest selectable date, or null for no limit // The latest selectable date, or null for no limit // Duration of display/closure // Function that takes a date and returns an array with // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '', // [2] = cell title (optional), e.g. $.datepicker.noWeekends // Function that takes an input field and // returns a set of custom settings for the date picker // Define a callback function when a date is selected // Define a callback function when the month or year is changed // Define a callback function when the datepicker is closed // Number of months to show at a time // The position in multipe months at which to show the current month (starting at 0) // Number of months to step back/forward // Number of months to step back/forward for the big links // Selector for an alternate field to store selected dates into // The date format to use for the alternate field // The input is constrained by the current date format // True to show button panel, false to not show it // True to size the input for the date format, false to leave as is // The initial disabled state