Skip to content

Add TimeSelection component #232

@korvin89

Description

@korvin89

It should be a component for time selection.

Requirements:

  • The component should be fully accessible.
  • The component should not include an input.
  • The date should not change when scrolling the token.
  • There is no need to add endless scrolling in the first iteration.

Sources of inspiration:

Interface:

import type {DateTime} from '@gravity-ui/date-utils';

export type TimeSelectionView = 'hours' | 'minutes' | 'seconds';

export interface TimeSelectionProps {
    ampm?: boolean;
    defaultFocusView?: TimeSelectionView;
    defaultValue?: DateTime;
    disabled?: boolean;
    focusedView?: TimeSelectionView;
    isTimeDisabled?: (value: DateTime, view: TimeSelectionView) => boolean;
    onFocusViewUpdate?: (value: TimeSelectionView) => void;
    onUpdate?: (value: DateTime) => void;
    minValue?: DateTime;
    maxValue?: DateTime;
    readOnly?: boolean;
    timeSteps?: Record<TimeSelectionView, number>;
    timeZone?: string;
    value?: DateTime;
    views?: TimeSelectionView[];
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions