diff --git a/packages/fineui/src/widget/timeinterval/timeinterval.js b/packages/fineui/src/widget/timeinterval/timeinterval.js index 4a4b580d7..11808d69c 100644 --- a/packages/fineui/src/widget/timeinterval/timeinterval.js +++ b/packages/fineui/src/widget/timeinterval/timeinterval.js @@ -31,6 +31,7 @@ export class TimeInterval extends Single { static EVENT_CHANGE = "EVENT_CHANGE"; static EVENT_BEFORE_START_POPUPVIEW = "EVENT_BEFORE_START_POPUPVIEW"; static EVENT_BEFORE_END_POPUPVIEW = "EVENT_BEFORE_END_POPUPVIEW"; + static EVENT_BEFORE_YEAR_MONTH_POPUPVIEW = "EVENT_BEFORE_YEAR_MONTH_POPUPVIEW"; _defaultConfig() { const conf = super._defaultConfig(...arguments); @@ -102,6 +103,14 @@ export class TimeInterval extends Single { watermark, value: v, height: o.height, + listeners: [ + { + eventName: DynamicDateTimeCombo.EVENT_BEFORE_YEAR_MONTH_POPUPVIEW, + action: () => { + this.fireEvent(TimeInterval.EVENT_BEFORE_YEAR_MONTH_POPUPVIEW); + }, + }, + ], }); combo.on(DynamicDateTimeCombo.EVENT_ERROR, () => { this._clearTitle(); diff --git a/packages/fineui/typescript/widget/timeinterval/timeinterval.ts b/packages/fineui/typescript/widget/timeinterval/timeinterval.ts index a36a217b3..4b8d0f1f4 100644 --- a/packages/fineui/typescript/widget/timeinterval/timeinterval.ts +++ b/packages/fineui/typescript/widget/timeinterval/timeinterval.ts @@ -8,6 +8,7 @@ export declare class TimeInterval extends Single { static EVENT_ERROR: string; static EVENT_BEFORE_START_POPUPVIEW: string; static EVENT_BEFORE_END_POPUPVIEW: string; + static EVENT_BEFORE_YEAR_MONTH_POPUPVIEW: string; props: { minDate?: string;