Skip to content

Commit

Permalink
feat(date-picker): disable confirm button if end date is not selected,
Browse files Browse the repository at this point in the history
…closes #3226
  • Loading branch information
07akioni committed Jul 4, 2022
1 parent da00a3c commit 6aa5ab1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
- `n-popover` adds `footer-style` prop.
- `n-popover` adds `footer` slot, closes [#3188](https://github.com/TuSimple/naive-ui/issues/3188).
- `n-dropdown` adds `menu-props` prop.
- `n-date-picker` would disable confirm button if end date is not selected, closes [#3226](https://github.com/TuSimple/naive-ui/issues/3226).

## 2.30.8

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
- `n-popover` 新增 `footer-style` 属性,用于设置底部内容的样式
- `n-popover` 新增 `footer` 插槽,用于设置底部内容, 关闭 [#3188](https://github.com/TuSimple/naive-ui/issues/3188)
- `n-dropdown` 新增 `menu-props` 属性
- `n-date-picker` 在选择结束日期过程中禁止点击确认按钮,关闭 [#3226](https://github.com/TuSimple/naive-ui/issues/3226)

## 2.30.8

Expand Down
2 changes: 1 addition & 1 deletion src/date-picker/src/panel/daterange.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export default defineComponent({
themeOverrides={mergedTheme.peerOverrides.Button}
size="tiny"
type="primary"
disabled={this.isRangeInvalid}
disabled={this.isRangeInvalid || this.isSelecting}
onClick={this.handleConfirmClick}
>
{{ default: () => this.locale.confirm }}
Expand Down
2 changes: 1 addition & 1 deletion src/date-picker/src/panel/datetimerange.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ export default defineComponent({
themeOverrides={mergedTheme.peerOverrides.Button}
size="tiny"
type="primary"
disabled={this.isRangeInvalid}
disabled={this.isRangeInvalid || this.isSelecting}
onClick={this.handleConfirmClick}
>
{{ default: () => this.locale.confirm }}
Expand Down

0 comments on commit 6aa5ab1

Please sign in to comment.