Custom Labels

Customize button and label text

Button Labels

Change OK and Cancel button text:

Custom Buttons

Confirm and Close instead of OK and Cancel

import { Timepicker } from "timepicker-ui-react";
function App() {
return (
<Timepicker
options={{
labels: {
ok: "Confirm",
cancel: "Close"
}
}}
/>
);
}

Localization

Translate labels to different languages:

// Polish localization
<Timepicker
placeholder="Wybierz czas"
options={{
labels: {
ok: "Potwierdź",
cancel: "Anuluj"
}
}}
/>

Available Labels

interface LabelsOptions {
ok?: string; // Default: "OK"
cancel?: string; // Default: "Cancel"
}