Skip to content

Update date time input topic for React 19 #1569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: vnext
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 5 additions & 16 deletions doc/en/components/inputs/date-time-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@ First, you need to the install the corresponding {ProductName} npm package by ru
npm install igniteui-react
```

You will then need to import the `DateTimeInput`, its necessary CSS, and register its module, like so:
You will then need to import the `DateTimeInput`, its necessary CSS, like so:

```tsx
import { IgrDateTimeInput, IgrDateTimeInputModule } from 'igniteui-react';
import { IgrDateTimeInput } from 'igniteui-react';
import 'igniteui-webcomponents/themes/light/bootstrap.css';
IgrDateTimeInputModule.register();
```

<!-- end: React -->
Expand Down Expand Up @@ -80,10 +79,7 @@ input.value = date;
```

```tsx
public dateTimeInputRef(input: IgrDateTimeInput) {
if (!input) { return; }
input.value = new Date();
}
<IgrDateTimeInput value={someValue}></IgrDateTimeInput>
```

```razor
Expand Down Expand Up @@ -159,7 +155,7 @@ To set a specific input format, pass it as a string to the `DateTimeInput`. This
```

```tsx
<IgrDateTimeInput ref={this.dateTimeInputRef} inputFormat="dd-MM-yy" displayFormat="medium"></IgrDateTimeInput>
<IgrDateTimeInput inputFormat="dd-MM-yy" displayFormat="medium"></IgrDateTimeInput>
```

```razor
Expand Down Expand Up @@ -240,14 +236,7 @@ input.min = new Date(2021, 0, 1);
```

```tsx
public dateTimeInputRef(input: IgrDateTimeInput) {
if (!input) { return; }
input.min = new Date(2021, 0, 1);
}
```

```tsx
<IgrDateTimeInput ref={this.dateTimeInputRef} max={new Date(2024, 6, 25)}></IgrDateTimeInput>
<IgrDateTimeInput min={minDate} max={maxDate}></IgrDateTimeInput>
```

```razor
Expand Down