From 4d1682486fd107b3e305db7c9821f3cbadf9ab17 Mon Sep 17 00:00:00 2001 From: guy Date: Sat, 6 Feb 2021 12:58:58 +0800 Subject: [PATCH] bugfix --- src/widget/datepane/datepane.js | 4 +++- src/widget/datetimepane/datetimepane.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/widget/datepane/datepane.js b/src/widget/datepane/datepane.js index 4abd441767..85add1b6b3 100644 --- a/src/widget/datepane/datepane.js +++ b/src/widget/datepane/datepane.js @@ -4,6 +4,7 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, { baseCls: "bi-dynamic-date-pane", minDate: "1900-01-01", maxDate: "2099-12-31", + supportDynamic: true, }, render: function () { @@ -13,6 +14,7 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, { items: [{ el: { type: "bi.linear_segment", + invisible: !o.supportDynamic, cls: "bi-split-bottom", height: 30, items: BI.createItems([{ @@ -181,4 +183,4 @@ BI.shortcut("bi.dynamic_date_pane", BI.DynamicDatePane); BI.extend(BI.DynamicDatePane, { Static: 1, Dynamic: 2 -}); \ No newline at end of file +}); diff --git a/src/widget/datetimepane/datetimepane.js b/src/widget/datetimepane/datetimepane.js index 20a00d3008..c962910937 100644 --- a/src/widget/datetimepane/datetimepane.js +++ b/src/widget/datetimepane/datetimepane.js @@ -4,6 +4,7 @@ BI.DynamicDateTimePane = BI.inherit(BI.Widget, { baseCls: "bi-dynamic-date-pane", minDate: "1900-01-01", maxDate: "2099-12-31", + supportDynamic: true, }, render: function () { @@ -13,6 +14,7 @@ BI.DynamicDateTimePane = BI.inherit(BI.Widget, { items: [{ el: { type: "bi.linear_segment", + invisible: !o.supportDynamic, cls: "bi-split-bottom", height: 30, items: BI.createItems([{ @@ -177,4 +179,4 @@ BI.shortcut("bi.dynamic_date_time_pane", BI.DynamicDateTimePane); BI.extend(BI.DynamicDateTimePane, { Static: 1, Dynamic: 2 -}); \ No newline at end of file +});