TimePicker

TimePicker

Bootstrap material time picker is a component which uses a dialog to select a single time in hours:minutes format. The selected time is indicated by the filled circle at the end of the clock hand.

Examples

Pro Component

Default TimePicker example.

import React from "react";
import { CDBTimePicker, CDBContainer } from "cdbreact";
export const TimePicker = () => {
return (
<CDBContainer>
<CDBTimePicker placeholder="10:05 AM" theme="classic" colorPalette="dark" />
</CDBContainer>
);
};

API

In this section you will find advanced information about the TimePicker component. You will find out which modules are required, what are the possibilities of configuring the component, and what events and methods you can use to work with it.

Contrast TimePicker Import Statement

You need to import the Contrast TimePicker component first before using it.

import { CDBTimePicker } from "cdbreact";

API Reference: Contrast TimePicker Properties

The table below shows the configuration options of the CDBTimePicker component.

NameTypeDefaultDescriptionExample
placeholderStringRequired! Sets placeholder for time indicator input<CDBTimePicker placeholder="placeholder" ... />
timeStringSets the time<CDBTimePicker time="09:30:30 AM" ... />
classNameStringAdds custom classesAdds custom classes<CDBTimePicker className="myClass" ... />
themeStringSets the theme of the time picker. Can be either material, classic or neomorphism<CDBTimePicker theme="classic" ... />
colorPaletteStringlightChanges the color palette of the time picker. Can be either light or dark<CDBTimePicker colorPalette="dark" ... />
tagStringdivChanges default input tag<CDBCheckbox tag="input" ... />
disableBooleanfalseDisables TimePicker component<CDBTimePicker disabled .../>