@adaptabletools/adaptable
Version:
Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
83 lines (82 loc) • 1.89 kB
TypeScript
/**
* Options for managing and customizing the date inputs.
*/
export interface DateInputOptions {
/**
* Use browser specific date input instead of AdapTable's Date Picker
*
* @defaultValue false
*/
useNativeInput?: boolean;
/**
* Format string for formatting date input field
*
* @defaultValue 'yyyy-MM-dd'
*/
dateFormat?: string;
/**
* Locale object (to localize Date Picker)
*
* @defaultValue `en-US`
*/
locale?: any;
/**
* Display the week numbers column
*
* @defaultValue false
*/
showWeekNumber?: boolean;
/**
* Display outside days (i.e. those falling in next or previous month)
*
* @defaultValue true
*/
showOutsideDays?: boolean;
/**
* List of buttons which are displayed in the datepicker overlay in the given order (provide empty array to display no buttons); custom button layout and positioning is achievable with the special elements `-` and `|`
*
* @defaultValue ['close','today']
* @see DatepickerButton
*/
datepickerButtons?: DatepickerButton[];
}
/**
* Datepicker buttons which are displayed in the overlay footer
*/
export type DatepickerButton =
/**
* Clears the datepicker value
*/
'clear'
/**
* Closes the datepicker overlay
*/
| 'close'
/**
* Selects the current date
*/
| 'today'
/**
* Selects the tomorrow's date
*/
| 'tomorrow'
/**
* Selects the yesterday's date
*/
| 'yesterday'
/**
* Selects the next working date (monday -> friday)
*/
| 'nextWorkday'
/**
* Selects the previous working date (monday -> friday)
*/
| 'prevWorkday'
/**
* Inserts a line break, 'forcing' the following buttons in the next line
*/
| '|'
/**
* Defines the positioning of the buttons in a line by 'pushing' the left and right hand side buttons to the line extremities
*/
| '-';