Skip to content

Commit

Permalink
[mantine.dev] Add controlled demo to TimeInput
Browse files Browse the repository at this point in the history
  • Loading branch information
rtivital committed Aug 8, 2024
1 parent 4e73005 commit e7d1c4b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions apps/mantine.dev/src/pages/dates/time-input.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@ export default Layout(MDX_DATA.TimeInput);

<Demo data={TimeInputDemos.configurator} />

## Controlled

```tsx
import { useState } from 'react';
import { TimeInput } from '@mantine/dates';

function Demo() {
const [value, setValue] = useState('');
return (
<TimeInput
value={value}
onChange={(event) => setValue(event.currentTarget.value)}
/>
);
}
```

## Show browser picker

You can show browser picker by calling `showPicker` method of input element.
Expand Down

0 comments on commit e7d1c4b

Please sign in to comment.