Browse Source

REPORT-60473 && REPORT-64922 fix:实现日期控件的focus、blur和setWaterMark

es6
freddy 3 years ago
parent
commit
1a35304ca6
  1. 16
      src/widget/dynamicdate/dynamicdate.combo.js
  2. 13
      src/widget/dynamicdate/dynamicdate.trigger.js
  3. 16
      src/widget/dynamicdatetime/dynamicdatetime.combo.js
  4. 13
      src/widget/dynamicdatetime/dynamicdatetime.trigger.js
  5. 16
      src/widget/time/time.combo.js
  6. 13
      src/widget/time/time.trigger.js
  7. 8
      typescript/widget/dynamicdate/dynamicdate.combo.ts
  8. 8
      typescript/widget/dynamicdatetime/dynamicdatetime.combo.ts
  9. 8
      typescript/widget/time/time.combo.ts

16
src/widget/dynamicdate/dynamicdate.combo.js

@ -298,6 +298,22 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
},
hidePopupView: function () {
this.combo.hideView();
},
hideView: function () {
this.combo.hideView();
},
focus: function () {
this.trigger.focus();
},
blur: function () {
this.trigger.blur();
},
setWaterMark: function (v) {
this.trigger.setWaterMark(v);
}
});

13
src/widget/dynamicdate/dynamicdate.trigger.js

@ -308,8 +308,19 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
},
getValue: function () {
return this.storeValue;
}
},
focus: function () {
this.editor.focus();
},
blur: function () {
this.editor.blur();
},
setWaterMark: function (v) {
this.editor.setWaterMark(v);
}
});
BI.DynamicDateTrigger.EVENT_BLUR = "EVENT_BLUR";

16
src/widget/dynamicdatetime/dynamicdatetime.combo.js

@ -306,6 +306,22 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
isValid: function () {
return this.trigger.isValid();
},
hideView: function () {
this.combo.hideView();
},
focus: function () {
this.trigger.focus();
},
blur: function () {
this.trigger.blur();
},
setWaterMark: function (v) {
this.trigger.setWaterMark(v);
}
});

13
src/widget/dynamicdatetime/dynamicdatetime.trigger.js

@ -379,8 +379,19 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
isValid: function () {
return this.editor.isValid();
}
},
focus: function () {
this.editor.focus();
},
blur: function () {
this.editor.blur();
},
setWaterMark: function (v) {
this.editor.setWaterMark(v);
}
});
BI.DynamicDateTimeTrigger.EVENT_BLUR = "EVENT_BLUR";

16
src/widget/time/time.combo.js

@ -222,6 +222,22 @@
this.setValue(nowTome);
this.hidePopupView();
this.fireEvent(BI.TimeCombo.EVENT_CONFIRM);
},
hideView: function () {
this.combo.hideView();
},
focus: function () {
this.trigger.focus();
},
blur: function () {
this.trigger.blur();
},
setWaterMark: function (v) {
this.trigger.setWaterMark(v);
}
});

13
src/widget/time/time.trigger.js

@ -180,8 +180,19 @@
getValue: function () {
return this.storeValue;
}
},
focus: function () {
this.editor.focus();
},
blur: function () {
this.editor.blur();
},
setWaterMark: function (v) {
this.editor.setWaterMark(v);
}
});
BI.shortcut("bi.time_trigger", BI.TimeTrigger);
})();

8
typescript/widget/dynamicdate/dynamicdate.combo.ts

@ -36,6 +36,14 @@ export declare class DynamicDateCombo extends Single {
hidePopupView(): void;
getValue(): DynamicDataComboValue;
hideView(): void;
focus(): void;
blur(): void;
setWaterMark(v: string): void;
}
export interface DynamicDataComboValue {

8
typescript/widget/dynamicdatetime/dynamicdatetime.combo.ts

@ -32,4 +32,12 @@ export declare class DynamicDateTimeCombo extends Single {
getKey(): string;
hidePopupView(): void;
hideView(): void;
focus(): void;
blur(): void;
seWaterMark(v: string): void;
}

8
typescript/widget/time/time.combo.ts

@ -10,4 +10,12 @@ export declare class TimeCombo extends Single {
static EVENT_BEFORE_POPUPVIEW: string;
hidePopupView(): void;
hideView(): void;
focus(): void;
blur(): void;
setWaterMark(v: string): void;
}

Loading…
Cancel
Save