diff --git a/package.json b/package.json index 58f2bda..a44aa42 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "antddaterangepicker", "widgetName": "AntdDateRangePicker", - "version": "1.0.3", + "version": "1.1.0", "description": "A powerful Mendix pluggable widget used to pick date and time. It brings the ant-deign widget DatePicker into Mendix and implements almost all the features of the original widget.", "copyright": "© Mendix Technology BV 2022. All rights reserved.", "author": "Jonathan Zhu", diff --git a/src/AntdDateRangePicker.editorConfig.ts b/src/AntdDateRangePicker.editorConfig.ts index 7245ae4..8228de9 100644 --- a/src/AntdDateRangePicker.editorConfig.ts +++ b/src/AntdDateRangePicker.editorConfig.ts @@ -105,7 +105,7 @@ export function getProperties( ): Properties { // Do the values manipulation here to control the visibility of properties in Studio and Studio Pro conditionally. if (values.disableDateMode === "off") { - hidePropertiesIn(defaultProperties, values, ["disableDatesDatasource", "disableDatesAttribute"]); + hidePropertiesIn(defaultProperties, values, ["disableDateTemparyToggle", "disableDatesDatasource", "disableDatesAttribute"]); } if (values.showCustomFooter === false) { hidePropertyIn(defaultProperties, values, "pannelFooterContent"); diff --git a/src/AntdDateRangePicker.tsx b/src/AntdDateRangePicker.tsx index cccb428..3275ebf 100644 --- a/src/AntdDateRangePicker.tsx +++ b/src/AntdDateRangePicker.tsx @@ -142,7 +142,15 @@ export class AntdDateRangePicker extends Component { if (props.disableDatesDatasource?.status === "available") { // console.log(`begin check disable. date = ${date}`); diff --git a/src/AntdDateRangePicker.xml b/src/AntdDateRangePicker.xml index eec5a21..136333e 100644 --- a/src/AntdDateRangePicker.xml +++ b/src/AntdDateRangePicker.xml @@ -169,6 +169,13 @@ Negative + + Tempary toggle + Use this dynamic attribute to control the tempary open state of the disabling function. Commonly, you do not need to config this property. Unless you want to close the disabling function tempary during the application running. + + + + Disable datasource diff --git a/src/package.xml b/src/package.xml index 40eeace..8c2415e 100644 --- a/src/package.xml +++ b/src/package.xml @@ -1,6 +1,6 @@ - + diff --git a/typings/AntdDateRangePickerProps.d.ts b/typings/AntdDateRangePickerProps.d.ts index bd48794..e40715f 100644 --- a/typings/AntdDateRangePickerProps.d.ts +++ b/typings/AntdDateRangePickerProps.d.ts @@ -38,6 +38,7 @@ export interface AntdDateRangePickerContainerProps { defaultPickerValueStart?: EditableValue; defaultPickerValueEnd?: EditableValue; disableDateMode: DisableDateModeEnum; + disableDateTemparyToggle?: EditableValue; disableDatesDatasource?: ListValue; disableDatesAttribute?: ListAttributeValue; size: SizeEnum; @@ -80,6 +81,7 @@ export interface AntdDateRangePickerPreviewProps { defaultPickerValueStart: string; defaultPickerValueEnd: string; disableDateMode: DisableDateModeEnum; + disableDateTemparyToggle: string; disableDatesDatasource: {} | { type: string } | null; disableDatesAttribute: string; size: SizeEnum;