Skip to content

Commit

Permalink
Merge branch 'beta'
Browse files Browse the repository at this point in the history
  • Loading branch information
owenlongbo committed Oct 27, 2023
2 parents 78c2879 + 7fb0fb6 commit afe7aa6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/time-picker/src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export interface PublicTimePickerProps extends BoxProps {
utcOffset?: number
timezone?: string
disabled?: boolean
readonly?: boolean
}

type BaseTimePickerProps = {
Expand Down
5 changes: 3 additions & 2 deletions packages/time-picker/src/range-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const RangePicker = forwardRef<HTMLDivElement, RangePickerProps>(
format = "HH:mm:ss",
scrollSticky = true,
order = true,
readonly = false,
} = props

const suffixIcon = (icons && icons.inputSuffix) || <TimeIcon />
Expand Down Expand Up @@ -213,7 +214,7 @@ export const RangePicker = forwardRef<HTMLDivElement, RangePickerProps>(
<Trigger
trigger="click"
position={position}
disabled={disabled}
disabled={disabled || readonly}
popupVisible={mergedPopupVisible}
onVisibleChange={onVisibleChange}
colorScheme="white"
Expand Down Expand Up @@ -244,7 +245,7 @@ export const RangePicker = forwardRef<HTMLDivElement, RangePickerProps>(
onPressEnter={onPressEnter}
onClear={onClear}
suffixIcon={suffixIcon}
editable={editable}
editable={editable || !readonly}
allowClear={allowClear}
ref={refInput}
placeholder={placeholder}
Expand Down
5 changes: 3 additions & 2 deletions packages/time-picker/src/single-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const TimePicker = forwardRef<HTMLDivElement, TimePickerProps>(
timezone,
format = "HH:mm:ss",
scrollSticky = true,
readonly = false,
} = props

const suffixIcon = (icons && icons.inputSuffix) || <TimeIcon />
Expand Down Expand Up @@ -187,7 +188,7 @@ export const TimePicker = forwardRef<HTMLDivElement, TimePickerProps>(
<Trigger
trigger="click"
position={position}
disabled={disabled}
disabled={disabled || readonly}
popupVisible={mergedPopupVisible}
onVisibleChange={onVisibleChange}
colorScheme="white"
Expand Down Expand Up @@ -216,7 +217,7 @@ export const TimePicker = forwardRef<HTMLDivElement, TimePickerProps>(
onPressEnter={onPressEnter}
onClear={onClear}
suffixIcon={suffixIcon}
editable={editable}
editable={editable || !readonly}
allowClear={allowClear}
ref={refInput}
placeholder={placeholder as string}
Expand Down

0 comments on commit afe7aa6

Please sign in to comment.