dtable-ui-component 6.0.39-gzc39 → 6.0.39-gzc40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -31,10 +31,12 @@ class FilterCalendar extends _react.Component {
|
|
|
31
31
|
this.setState({
|
|
32
32
|
value
|
|
33
33
|
}, () => {
|
|
34
|
+
console.log(111);
|
|
34
35
|
if (this.state.value) {
|
|
35
36
|
const filterStr = this.state.value.format(this.getCalendarFormat()[0]);
|
|
36
37
|
if (typeof filterStr === 'string') {
|
|
37
38
|
const changeVal = (0, _dateFormat.filterChangeValue)(filterStr, searchFormat);
|
|
39
|
+
console.log('changeVal', changeVal);
|
|
38
40
|
onChange(changeVal);
|
|
39
41
|
}
|
|
40
42
|
}
|
|
@@ -108,6 +110,7 @@ class FilterCalendar extends _react.Component {
|
|
|
108
110
|
this.defaultCalendarValue = now.clone();
|
|
109
111
|
if (value && (0, _dayjs.default)(value).isValid()) {
|
|
110
112
|
let validValue = (0, _dayjs.default)(value).isValid() ? (0, _dayjs.default)(value) : (0, _dayjs.default)(this.defaultCalendarValue);
|
|
113
|
+
console.log('validValue', validValue);
|
|
111
114
|
this.setState({
|
|
112
115
|
value: iszhcn ? (0, _dayjs.default)(validValue).year(this.formatYear).month(this.formatMonth).date(this.formatDay).locale('zh-cn') : (0, _dayjs.default)(validValue).year(this.formatYear).month(this.formatMonth).date(this.formatDay).locale('en-gb')
|
|
113
116
|
});
|
|
@@ -121,6 +124,7 @@ class FilterCalendar extends _react.Component {
|
|
|
121
124
|
const state = this.state;
|
|
122
125
|
const inputStr = state.value ? state.value.format(this.columnDataFormat) : '';
|
|
123
126
|
const displayContentValue = (0, _dateFormat.renderFilterInputFormat)(inputStr, this.columnDataFormat, (0, _dateFormat.delimate)(this.columnDataFormat));
|
|
127
|
+
console.log('displayContentValue', displayContentValue);
|
|
124
128
|
if (isReadOnly) return /*#__PURE__*/_react.default.createElement("input", {
|
|
125
129
|
className: "ant-calendar-picker-input ant-input form-control",
|
|
126
130
|
value: displayContentValue,
|
package/lib/utils/dateFormat.js
CHANGED
|
@@ -111,7 +111,6 @@ function renderDisplayContent(str, localeFormat, delimiter) {
|
|
|
111
111
|
function renderFilterInputFormat(str, localeFormat, delimiter) {
|
|
112
112
|
const format = String(localeFormat).toLowerCase();
|
|
113
113
|
const parts = formatDateLocal(str, localeFormat);
|
|
114
|
-
// console.log('parts', str, parts);
|
|
115
114
|
if (parts.length < 3) {
|
|
116
115
|
return '';
|
|
117
116
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dtable-ui-component",
|
|
3
|
-
"version": "6.0.39-
|
|
3
|
+
"version": "6.0.39-gzc40",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@seafile/react-image-lightbox": "4.0.2",
|
|
7
|
-
"@seafile/seafile-calendar": "^0.0.29-
|
|
7
|
+
"@seafile/seafile-calendar": "^0.0.29-gzc31",
|
|
8
8
|
"@seafile/seafile-editor": "~2.0.6",
|
|
9
9
|
"classnames": "2.3.2",
|
|
10
10
|
"dayjs": "1.10.7",
|