Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Commit

Permalink
FLOW-964 f-date-picker blur event issue fixed (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
vikas-cldcvr authored Nov 20, 2023
1 parent 5973502 commit 0b02f98
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
6 changes: 6 additions & 0 deletions packages/flow-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

# Change Log

## [2.2.3] - 2023-11-20

### Bug Fixes

- `f-date-time-picker` : prevent the blur event from propagating when the date picker is open and date is selected. (It was validating value before input event in f-form-builder)

## [2.2.2] - 2023-11-10

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion packages/flow-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cldcvr/flow-core",
"version": "2.2.2",
"version": "2.2.3",
"description": "Core package of flow design system",
"module": "dist/flow-core.es.js",
"main": "dist/flow-core.cjs.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,11 @@ export class FDateTimePicker extends FRoot {
this.flatPickerElement?.close();
this.dateTimePickerElement.inputElement.focus();
}}
@blur=${(e: FocusEvent) => {
if (this.flatPickerElement?.isOpen) {
e.stopPropagation();
}
}}
@input=${this.handleKeyboardInput}
?read-only=${this["is-range"]}
>
Expand Down
7 changes: 6 additions & 1 deletion stories/flow-form-builder/f-formbuilder-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,12 @@ const field: FormBuilderField = {
type: "datetime",
label: {
title: "This is date time field"
}
},
validationRules: [
{
name: "required"
}
]
},
nestedObject: {
type: "object",
Expand Down

0 comments on commit 0b02f98

Please sign in to comment.