date-box.d.ts 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. /*!
  2. * devextreme-angular
  3. * Version: 19.1.16
  4. * Build date: Tue Oct 18 2022
  5. *
  6. * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
  7. *
  8. * This software may be modified and distributed under the terms
  9. * of the MIT license. See the LICENSE file in the root of the project for details.
  10. *
  11. * https://github.com/DevExpress/devextreme-angular
  12. */
  13. import { TransferState } from '@angular/platform-browser';
  14. import { ElementRef, NgZone, OnDestroy, EventEmitter, OnChanges, DoCheck, SimpleChanges, QueryList } from '@angular/core';
  15. import DevExpress from 'devextreme/bundles/dx.all';
  16. import DxDateBox from 'devextreme/ui/date_box';
  17. import { ControlValueAccessor } from '@angular/forms';
  18. import { DxComponent } from '../core/component';
  19. import { DxTemplateHost } from '../core/template-host';
  20. import { NestedOptionHost } from '../core/nested-option';
  21. import { WatcherHelper } from '../core/watcher-helper';
  22. import { IterableDifferHelper } from '../core/iterable-differ-helper';
  23. import { DxiButtonComponent } from './nested/button-dxi';
  24. /**
  25. * The DateBox is a widget that displays date and time in a specified format, and enables a user to pick or type in the required date/time value.
  26. */
  27. export declare class DxDateBoxComponent extends DxComponent implements OnDestroy, ControlValueAccessor, OnChanges, DoCheck {
  28. private _watcherHelper;
  29. private _idh;
  30. instance: DxDateBox;
  31. /**
  32. * Specifies whether or not the widget allows an end-user to enter a custom value.
  33. */
  34. acceptCustomValue: boolean;
  35. /**
  36. * Specifies the shortcut key that sets focus on the widget.
  37. */
  38. accessKey: string;
  39. /**
  40. * Specifies whether or not the widget changes its state when interacting with a user.
  41. */
  42. activeStateEnabled: boolean;
  43. /**
  44. * Specifies whether or not adaptive widget rendering is enabled on a small screen.
  45. */
  46. adaptivityEnabled: boolean;
  47. /**
  48. * The text displayed on the Apply button.
  49. */
  50. applyButtonText: string;
  51. /**
  52. * Specifies the way an end-user applies the selected value.
  53. */
  54. applyValueMode: string;
  55. /**
  56. * Allows you to add custom buttons to the input text field.
  57. */
  58. buttons: Array<string | DevExpress.ui.dxTextEditorButton>;
  59. /**
  60. * Configures the calendar's value picker. Applies only if the pickerType is "calendar".
  61. */
  62. calendarOptions: DevExpress.ui.dxCalendarOptions;
  63. /**
  64. * The text displayed on the Cancel button.
  65. */
  66. cancelButtonText: string;
  67. /**
  68. * Specifies the message displayed if the specified date is later than the max value or earlier than the min value.
  69. */
  70. dateOutOfRangeMessage: string;
  71. /**
  72. * Specifies the date-time value serialization format. Use it only if you do not specify the value at design time.
  73. */
  74. dateSerializationFormat: string;
  75. /**
  76. * Specifies whether to render the drop-down field's content when it is displayed. If false, the content is rendered immediately.
  77. */
  78. deferRendering: boolean;
  79. /**
  80. * Specifies whether the widget responds to user interaction.
  81. */
  82. disabled: boolean;
  83. /**
  84. * Specifies dates to be disabled. Applies only if pickerType is "calendar".
  85. */
  86. disabledDates: Function | Array<Date>;
  87. /**
  88. * Specifies the date display format. Ignored if the pickerType option is "native"
  89. */
  90. displayFormat: DevExpress.ui.format | string;
  91. /**
  92. * Specifies a custom template for the drop-down button.
  93. */
  94. dropDownButtonTemplate: any;
  95. /**
  96. * Specifies the attributes to be attached to the widget's root element.
  97. */
  98. elementAttr: any;
  99. /**
  100. * Specifies whether the widget can be focused using keyboard navigation.
  101. */
  102. focusStateEnabled: boolean;
  103. /**
  104. * Specifies the widget's height.
  105. */
  106. height: number | Function | string;
  107. /**
  108. * Specifies text for a hint that appears when a user pauses on the widget.
  109. */
  110. hint: string;
  111. /**
  112. * Specifies whether the widget changes its state when a user pauses on it.
  113. */
  114. hoverStateEnabled: boolean;
  115. /**
  116. * Specifies the attributes to be passed on to the underlying HTML element.
  117. */
  118. inputAttr: any;
  119. /**
  120. * Specifies the interval between neighboring values in the popup list in minutes.
  121. */
  122. interval: number;
  123. /**
  124. * Specifies the message displayed if the typed value is not a valid date or time.
  125. */
  126. invalidDateMessage: string;
  127. /**
  128. * Specifies whether the editor's value is valid.
  129. */
  130. isValid: boolean;
  131. /**
  132. * The last date that can be selected within the widget.
  133. */
  134. max: Date | number | string;
  135. /**
  136. * Specifies the maximum number of characters you can enter into the textbox.
  137. */
  138. maxLength: number | string;
  139. /**
  140. * Use the calendarOptions option instead.
  141. */
  142. maxZoomLevel: string;
  143. /**
  144. * The minimum date that can be selected within the widget.
  145. */
  146. min: Date | number | string;
  147. /**
  148. * Use the calendarOptions option instead.
  149. */
  150. minZoomLevel: string;
  151. /**
  152. * The value to be assigned to the `name` attribute of the underlying HTML element.
  153. */
  154. name: string;
  155. /**
  156. * Specifies whether or not the drop-down editor is displayed.
  157. */
  158. opened: boolean;
  159. /**
  160. * Specifies whether a user can open the drop-down list by clicking a text field.
  161. */
  162. openOnFieldClick: boolean;
  163. /**
  164. * Specifies the type of the date/time picker.
  165. */
  166. pickerType: string;
  167. /**
  168. * Specifies a placeholder for the input field.
  169. */
  170. placeholder: string;
  171. /**
  172. * Specifies whether the editor is read-only.
  173. */
  174. readOnly: boolean;
  175. /**
  176. * Switches the widget to a right-to-left representation.
  177. */
  178. rtlEnabled: boolean;
  179. /**
  180. * Specifies whether to show the analog clock in the value picker. Applies only if type is "datetime" and pickerType is "calendar".
  181. */
  182. showAnalogClock: boolean;
  183. /**
  184. * Specifies whether to display the Clear button in the widget.
  185. */
  186. showClearButton: boolean;
  187. /**
  188. * Specifies whether the drop-down button is visible.
  189. */
  190. showDropDownButton: boolean;
  191. /**
  192. * Specifies whether or not the widget checks the inner text for spelling mistakes.
  193. */
  194. spellcheck: boolean;
  195. /**
  196. * Specifies how the widget's text field is styled.
  197. */
  198. stylingMode: string;
  199. /**
  200. * Specifies the number of the element when the Tab key is used for navigating.
  201. */
  202. tabIndex: number;
  203. /**
  204. * The read-only option that holds the text displayed by the widget input element.
  205. */
  206. text: string;
  207. /**
  208. * A format used to display date/time information.
  209. */
  210. type: string;
  211. /**
  212. * Specifies whether to control user input using a mask created based on the displayFormat.
  213. */
  214. useMaskBehavior: boolean;
  215. /**
  216. * Specifies information on the validation error when using a custom validation engine. Should be changed at runtime along with the isValid option.
  217. */
  218. validationError: any;
  219. /**
  220. * Specifies how the message about the validation rules that are not satisfied by this editor's value is displayed.
  221. */
  222. validationMessageMode: string;
  223. /**
  224. * An object or a value specifying the date and time currently selected using the date box.
  225. */
  226. value: Date | number | string;
  227. /**
  228. * Specifies the DOM events after which the widget's value should be updated.
  229. */
  230. valueChangeEvent: string;
  231. /**
  232. * Specifies whether the widget is visible.
  233. */
  234. visible: boolean;
  235. /**
  236. * Specifies the widget's width.
  237. */
  238. width: number | Function | string;
  239. /**
  240. * A function that is executed when the widget loses focus after the text field's content was changed using the keyboard.
  241. */
  242. onChange: EventEmitter<any>;
  243. /**
  244. * A function that is executed once the drop-down editor is closed.
  245. */
  246. onClosed: EventEmitter<any>;
  247. /**
  248. * A function that is executed when the widget's content is ready and each time the content is changed.
  249. */
  250. onContentReady: EventEmitter<any>;
  251. /**
  252. * A function that is executed when the widget's input has been copied.
  253. */
  254. onCopy: EventEmitter<any>;
  255. /**
  256. * A function that is executed when the widget's input has been cut.
  257. */
  258. onCut: EventEmitter<any>;
  259. /**
  260. * A function that is executed before the widget is disposed of.
  261. */
  262. onDisposing: EventEmitter<any>;
  263. /**
  264. * A function that is executed when the Enter key has been pressed while the widget is focused.
  265. */
  266. onEnterKey: EventEmitter<any>;
  267. /**
  268. * A function that is executed when the widget gets focus.
  269. */
  270. onFocusIn: EventEmitter<any>;
  271. /**
  272. * A function that is executed when the widget loses focus.
  273. */
  274. onFocusOut: EventEmitter<any>;
  275. /**
  276. * A function used in JavaScript frameworks to save the widget instance.
  277. */
  278. onInitialized: EventEmitter<any>;
  279. /**
  280. * A function that is executed each time the widget's input is changed while the widget is focused.
  281. */
  282. onInput: EventEmitter<any>;
  283. /**
  284. * A function that is executed when a user is pressing a key on the keyboard.
  285. */
  286. onKeyDown: EventEmitter<any>;
  287. /**
  288. * A function that is executed when a user presses a key on the keyboard.
  289. */
  290. onKeyPress: EventEmitter<any>;
  291. /**
  292. * A function that is executed when a user releases a key on the keyboard.
  293. */
  294. onKeyUp: EventEmitter<any>;
  295. /**
  296. * A function that is executed once the drop-down editor is opened.
  297. */
  298. onOpened: EventEmitter<any>;
  299. /**
  300. * A function that is executed after a widget option is changed.
  301. */
  302. onOptionChanged: EventEmitter<any>;
  303. /**
  304. * A function that is executed when the widget's input has been pasted.
  305. */
  306. onPaste: EventEmitter<any>;
  307. /**
  308. * A function that is executed after the widget's value is changed.
  309. */
  310. onValueChanged: EventEmitter<any>;
  311. /**
  312. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  313. */
  314. acceptCustomValueChange: EventEmitter<boolean>;
  315. /**
  316. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  317. */
  318. accessKeyChange: EventEmitter<string>;
  319. /**
  320. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  321. */
  322. activeStateEnabledChange: EventEmitter<boolean>;
  323. /**
  324. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  325. */
  326. adaptivityEnabledChange: EventEmitter<boolean>;
  327. /**
  328. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  329. */
  330. applyButtonTextChange: EventEmitter<string>;
  331. /**
  332. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  333. */
  334. applyValueModeChange: EventEmitter<string>;
  335. /**
  336. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  337. */
  338. buttonsChange: EventEmitter<Array<string | DevExpress.ui.dxTextEditorButton>>;
  339. /**
  340. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  341. */
  342. calendarOptionsChange: EventEmitter<DevExpress.ui.dxCalendarOptions>;
  343. /**
  344. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  345. */
  346. cancelButtonTextChange: EventEmitter<string>;
  347. /**
  348. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  349. */
  350. dateOutOfRangeMessageChange: EventEmitter<string>;
  351. /**
  352. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  353. */
  354. dateSerializationFormatChange: EventEmitter<string>;
  355. /**
  356. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  357. */
  358. deferRenderingChange: EventEmitter<boolean>;
  359. /**
  360. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  361. */
  362. disabledChange: EventEmitter<boolean>;
  363. /**
  364. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  365. */
  366. disabledDatesChange: EventEmitter<Function | Array<Date>>;
  367. /**
  368. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  369. */
  370. displayFormatChange: EventEmitter<DevExpress.ui.format | string>;
  371. /**
  372. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  373. */
  374. dropDownButtonTemplateChange: EventEmitter<any>;
  375. /**
  376. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  377. */
  378. elementAttrChange: EventEmitter<any>;
  379. /**
  380. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  381. */
  382. focusStateEnabledChange: EventEmitter<boolean>;
  383. /**
  384. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  385. */
  386. heightChange: EventEmitter<number | Function | string>;
  387. /**
  388. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  389. */
  390. hintChange: EventEmitter<string>;
  391. /**
  392. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  393. */
  394. hoverStateEnabledChange: EventEmitter<boolean>;
  395. /**
  396. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  397. */
  398. inputAttrChange: EventEmitter<any>;
  399. /**
  400. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  401. */
  402. intervalChange: EventEmitter<number>;
  403. /**
  404. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  405. */
  406. invalidDateMessageChange: EventEmitter<string>;
  407. /**
  408. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  409. */
  410. isValidChange: EventEmitter<boolean>;
  411. /**
  412. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  413. */
  414. maxChange: EventEmitter<Date | number | string>;
  415. /**
  416. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  417. */
  418. maxLengthChange: EventEmitter<number | string>;
  419. /**
  420. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  421. */
  422. maxZoomLevelChange: EventEmitter<string>;
  423. /**
  424. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  425. */
  426. minChange: EventEmitter<Date | number | string>;
  427. /**
  428. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  429. */
  430. minZoomLevelChange: EventEmitter<string>;
  431. /**
  432. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  433. */
  434. nameChange: EventEmitter<string>;
  435. /**
  436. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  437. */
  438. openedChange: EventEmitter<boolean>;
  439. /**
  440. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  441. */
  442. openOnFieldClickChange: EventEmitter<boolean>;
  443. /**
  444. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  445. */
  446. pickerTypeChange: EventEmitter<string>;
  447. /**
  448. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  449. */
  450. placeholderChange: EventEmitter<string>;
  451. /**
  452. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  453. */
  454. readOnlyChange: EventEmitter<boolean>;
  455. /**
  456. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  457. */
  458. rtlEnabledChange: EventEmitter<boolean>;
  459. /**
  460. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  461. */
  462. showAnalogClockChange: EventEmitter<boolean>;
  463. /**
  464. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  465. */
  466. showClearButtonChange: EventEmitter<boolean>;
  467. /**
  468. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  469. */
  470. showDropDownButtonChange: EventEmitter<boolean>;
  471. /**
  472. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  473. */
  474. spellcheckChange: EventEmitter<boolean>;
  475. /**
  476. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  477. */
  478. stylingModeChange: EventEmitter<string>;
  479. /**
  480. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  481. */
  482. tabIndexChange: EventEmitter<number>;
  483. /**
  484. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  485. */
  486. textChange: EventEmitter<string>;
  487. /**
  488. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  489. */
  490. typeChange: EventEmitter<string>;
  491. /**
  492. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  493. */
  494. useMaskBehaviorChange: EventEmitter<boolean>;
  495. /**
  496. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  497. */
  498. validationErrorChange: EventEmitter<any>;
  499. /**
  500. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  501. */
  502. validationMessageModeChange: EventEmitter<string>;
  503. /**
  504. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  505. */
  506. valueChange: EventEmitter<Date | number | string>;
  507. /**
  508. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  509. */
  510. valueChangeEventChange: EventEmitter<string>;
  511. /**
  512. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  513. */
  514. visibleChange: EventEmitter<boolean>;
  515. /**
  516. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  517. */
  518. widthChange: EventEmitter<number | Function | string>;
  519. onBlur: EventEmitter<any>;
  520. change(_: any): void;
  521. touched: (_: any) => void;
  522. buttonsChildren: QueryList<DxiButtonComponent>;
  523. constructor(elementRef: ElementRef, ngZone: NgZone, templateHost: DxTemplateHost, _watcherHelper: WatcherHelper, _idh: IterableDifferHelper, optionHost: NestedOptionHost, transferState: TransferState, platformId: any);
  524. protected _createInstance(element: any, options: any): DxDateBox;
  525. writeValue(value: any): void;
  526. setDisabledState(isDisabled: boolean): void;
  527. registerOnChange(fn: (_: any) => void): void;
  528. registerOnTouched(fn: () => void): void;
  529. _createWidget(element: any): void;
  530. ngOnDestroy(): void;
  531. ngOnChanges(changes: SimpleChanges): void;
  532. setupChanges(prop: string, changes: SimpleChanges): void;
  533. ngDoCheck(): void;
  534. _setOption(name: string, value: any): void;
  535. }
  536. export declare class DxDateBoxModule {
  537. }