@douyinfe/semi-ui 2.28.1 → 2.28.2
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.
- package/dist/css/semi.css +7 -6
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +7 -28
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/datePicker/datePicker.js +0 -24
- package/lib/es/datePicker/datePicker.js +0 -24
- package/package.json +8 -8
package/dist/umd/semi-ui.js
CHANGED
|
@@ -50560,10 +50560,13 @@ class foundation_DatePickerFoundation extends foundation {
|
|
|
50560
50560
|
|
|
50561
50561
|
const result = this.parseWithTimezone(_value, timeZone, prevTimeZone);
|
|
50562
50562
|
|
|
50563
|
-
this._adapter.updatePrevTimezone(prevTimeZone);
|
|
50563
|
+
this._adapter.updatePrevTimezone(prevTimeZone); // reset input value when value update
|
|
50564
|
+
|
|
50564
50565
|
|
|
50565
50566
|
this._adapter.updateInputValue(null);
|
|
50566
50567
|
|
|
50568
|
+
this._adapter.updateInsetInputValue(null);
|
|
50569
|
+
|
|
50567
50570
|
this._adapter.updateValue(result);
|
|
50568
50571
|
|
|
50569
50572
|
this.resetCachedSelectedValue(result);
|
|
@@ -53603,10 +53606,10 @@ class monthsGridFoundation_MonthsGridFoundation extends foundation {
|
|
|
53603
53606
|
const selectedDate = values.find(item => item); // 如果日期不完整且输入日期不在面板范围内,则更新面板
|
|
53604
53607
|
|
|
53605
53608
|
if (selectedDate) {
|
|
53606
|
-
const
|
|
53607
|
-
const
|
|
53609
|
+
const notLeftPanelDate = Math.abs(differenceInCalendarMonths(selectedDate, monthLeft.pickerDate)) > 0;
|
|
53610
|
+
const notRightPanelDate = Math.abs(differenceInCalendarMonths(selectedDate, monthRight.pickerDate)) > 0;
|
|
53608
53611
|
|
|
53609
|
-
if (
|
|
53612
|
+
if (notLeftPanelDate && notRightPanelDate) {
|
|
53610
53613
|
this.handleShowDateAndTime(datePicker_constants_strings.PANEL_TYPE_LEFT, adjustResult.monthLeft.pickerDate);
|
|
53611
53614
|
this.handleShowDateAndTime(datePicker_constants_strings.PANEL_TYPE_RIGHT, adjustResult.monthRight.pickerDate);
|
|
53612
53615
|
}
|
|
@@ -58171,36 +58174,12 @@ class datePicker_DatePicker extends baseComponent_BaseComponent {
|
|
|
58171
58174
|
density,
|
|
58172
58175
|
topSlot,
|
|
58173
58176
|
bottomSlot,
|
|
58174
|
-
insetInput,
|
|
58175
|
-
type,
|
|
58176
|
-
format,
|
|
58177
|
-
rangeSeparator,
|
|
58178
|
-
defaultPickerValue,
|
|
58179
58177
|
presetPosition
|
|
58180
58178
|
} = this.props;
|
|
58181
|
-
const {
|
|
58182
|
-
insetInputValue,
|
|
58183
|
-
value
|
|
58184
|
-
} = this.state;
|
|
58185
58179
|
const wrapCls = classnames_default()(datePicker_constants_cssClasses.PREFIX, {
|
|
58186
58180
|
[datePicker_constants_cssClasses.PANEL_YAM]: this.adapter.typeIsYearOrMonth(),
|
|
58187
58181
|
[`${datePicker_constants_cssClasses.PREFIX}-compact`]: density === 'compact'
|
|
58188
58182
|
}, dropdownClassName);
|
|
58189
|
-
const insetInputProps = {
|
|
58190
|
-
dateFnsLocale,
|
|
58191
|
-
format,
|
|
58192
|
-
insetInputValue,
|
|
58193
|
-
rangeSeparator,
|
|
58194
|
-
type,
|
|
58195
|
-
value: value,
|
|
58196
|
-
handleInsetDateFocus: this.handleInsetDateFocus,
|
|
58197
|
-
handleInsetTimeFocus: this.handleInsetTimeFocus,
|
|
58198
|
-
onInsetInputChange: this.handleInsetInputChange,
|
|
58199
|
-
rangeInputStartRef: this.rangeInputStartRef,
|
|
58200
|
-
rangeInputEndRef: this.rangeInputEndRef,
|
|
58201
|
-
density,
|
|
58202
|
-
defaultPickerValue
|
|
58203
|
-
};
|
|
58204
58183
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
58205
58184
|
ref: this.panelRef,
|
|
58206
58185
|
className: wrapCls,
|