datepicker.component.d.ts 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import { EventEmitter, Provider } from '@angular/core';
  2. import { ControlValueAccessor } from '@angular/forms';
  3. import { DatePickerInnerComponent } from './datepicker-inner.component';
  4. import { DatepickerConfig } from './datepicker.config';
  5. export declare const DATEPICKER_CONTROL_VALUE_ACCESSOR: Provider;
  6. export declare class DatePickerComponent implements ControlValueAccessor {
  7. /** sets datepicker mode, supports: `day`, `month`, `year` */
  8. datepickerMode: string;
  9. /** default date to show if `ng-model` value is not specified */
  10. initDate: Date;
  11. /** oldest selectable date */
  12. minDate: Date;
  13. /** latest selectable date */
  14. maxDate: Date;
  15. /** set lower datepicker mode, supports: `day`, `month`, `year` */
  16. minMode: string;
  17. /** sets upper datepicker mode, supports: `day`, `month`, `year` */
  18. maxMode: string;
  19. /** if false week numbers will be hidden */
  20. showWeeks: boolean;
  21. /** format of day in month */
  22. formatDay: string;
  23. /** format of month in year */
  24. formatMonth: string;
  25. /** format of year in year range */
  26. formatYear: string;
  27. /** format of day in week header */
  28. formatDayHeader: string;
  29. /** format of title when selecting day */
  30. formatDayTitle: string;
  31. /** format of title when selecting month */
  32. formatMonthTitle: string;
  33. /** starting day of the week from 0-6 (0=Sunday, ..., 6=Saturday) */
  34. startingDay: number;
  35. /** number of years displayed in year selection */
  36. yearRange: number;
  37. /** if true only dates from the currently displayed month will be shown */
  38. onlyCurrentMonth: boolean;
  39. /** if true shortcut`s event propagation will be disabled */
  40. shortcutPropagation: boolean;
  41. /** number of months displayed in a single row of month picker */
  42. monthColLimit: number;
  43. /** number of years displayed in a single row of year picker */
  44. yearColLimit: number;
  45. /** array of custom css classes to be applied to targeted dates */
  46. customClass: {
  47. date: Date;
  48. mode: string;
  49. clazz: string;
  50. }[];
  51. /** array of disabled dates */
  52. dateDisabled: {
  53. date: Date;
  54. mode: string;
  55. }[];
  56. /** disabled days of the week from 0-6 (0=Sunday, ..., 6=Saturday) */
  57. dayDisabled: number[];
  58. /** currently active date */
  59. activeDate: Date;
  60. selectionDone: EventEmitter<Date>;
  61. /** callback to invoke when the activeDate is changed. */
  62. activeDateChange: EventEmitter<Date>;
  63. _datePicker: DatePickerInnerComponent;
  64. onChange: any;
  65. onTouched: any;
  66. config: DatepickerConfig;
  67. protected _now: Date;
  68. protected _activeDate: Date;
  69. constructor(config: DatepickerConfig);
  70. configureOptions(): void;
  71. onUpdate(event: Date): void;
  72. onSelectionDone(event: Date): void;
  73. onActiveDateChange(event: Date): void;
  74. writeValue(value: any): void;
  75. registerOnChange(fn: () => void): void;
  76. registerOnTouched(fn: () => void): void;
  77. }