Skip to content

Commit

Permalink
test: added tests for datetime segment
Browse files Browse the repository at this point in the history
  • Loading branch information
logaretm committed Feb 15, 2025
1 parent 65b5bf2 commit a586c96
Show file tree
Hide file tree
Showing 4 changed files with 761 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/useDateTimeField/useDateTimeSegment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function useDateTimeSegment(_props: Reactivify<DateTimeSegmentProps>) {
throw new Error('DateTimeSegmentGroup is not provided');
}

const { increment, decrement, setValue, getMetadata, onDone, parser, clear } =
const { increment, decrement, setValue, getMetadata, onDone, parser, clear, isPlaceholder } =
segmentGroup.useDateSegmentRegistration({
id,
getElem: () => segmentEl.value,
Expand All @@ -67,7 +67,7 @@ export function useDateTimeSegment(_props: Reactivify<DateTimeSegmentProps>) {
}

blockEvent(evt);
if (!isNumeric.value) {
if (!isNumeric.value && !isPlaceholder()) {
return;
}

Expand Down
Loading

0 comments on commit a586c96

Please sign in to comment.