Use date picker for events filtering (#3243)
This commit is contained in:
parent
a8ab21096b
commit
fe1b602f45
2 changed files with 42 additions and 28 deletions
|
@ -3,6 +3,7 @@ import {
|
||||||
Button,
|
Button,
|
||||||
Chip,
|
Chip,
|
||||||
ChipGroup,
|
ChipGroup,
|
||||||
|
DatePicker,
|
||||||
Dropdown,
|
Dropdown,
|
||||||
DropdownToggle,
|
DropdownToggle,
|
||||||
Flex,
|
Flex,
|
||||||
|
@ -416,14 +417,17 @@ export const AdminEvents = () => {
|
||||||
fieldId="kc-dateFrom"
|
fieldId="kc-dateFrom"
|
||||||
className="keycloak__events_search__form_label"
|
className="keycloak__events_search__form_label"
|
||||||
>
|
>
|
||||||
<KeycloakTextInput
|
<Controller
|
||||||
ref={register()}
|
|
||||||
type="text"
|
|
||||||
id="kc-dateFrom"
|
|
||||||
name="dateFrom"
|
name="dateFrom"
|
||||||
className="pf-c-form-control pf-m-icon pf-m-calendar"
|
control={control}
|
||||||
placeholder="yyyy-MM-dd"
|
render={({ onChange, value }) => (
|
||||||
data-testid="dateFrom-searchField"
|
<DatePicker
|
||||||
|
className="pf-u-w-100"
|
||||||
|
value={value}
|
||||||
|
onChange={(value) => onChange(value)}
|
||||||
|
inputProps={{ id: "kc-dateFrom" }}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<FormGroup
|
<FormGroup
|
||||||
|
@ -431,14 +435,17 @@ export const AdminEvents = () => {
|
||||||
fieldId="kc-dateTo"
|
fieldId="kc-dateTo"
|
||||||
className="keycloak__events_search__form_label"
|
className="keycloak__events_search__form_label"
|
||||||
>
|
>
|
||||||
<KeycloakTextInput
|
<Controller
|
||||||
ref={register()}
|
|
||||||
type="text"
|
|
||||||
id="kc-dateTo"
|
|
||||||
name="dateTo"
|
name="dateTo"
|
||||||
className="pf-c-form-control pf-m-icon pf-m-calendar"
|
control={control}
|
||||||
placeholder="yyyy-MM-dd"
|
render={({ onChange, value }) => (
|
||||||
data-testid="dateTo-searchField"
|
<DatePicker
|
||||||
|
className="pf-u-w-100"
|
||||||
|
value={value}
|
||||||
|
onChange={(value) => onChange(value)}
|
||||||
|
inputProps={{ id: "kc-dateTo" }}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<ActionGroup>
|
<ActionGroup>
|
||||||
|
|
|
@ -3,6 +3,7 @@ import {
|
||||||
Button,
|
Button,
|
||||||
Chip,
|
Chip,
|
||||||
ChipGroup,
|
ChipGroup,
|
||||||
|
DatePicker,
|
||||||
DescriptionList,
|
DescriptionList,
|
||||||
DescriptionListDescription,
|
DescriptionListDescription,
|
||||||
DescriptionListGroup,
|
DescriptionListGroup,
|
||||||
|
@ -327,14 +328,17 @@ export default function EventsSection() {
|
||||||
fieldId="kc-dateFrom"
|
fieldId="kc-dateFrom"
|
||||||
className="keycloak__events_search__form_label"
|
className="keycloak__events_search__form_label"
|
||||||
>
|
>
|
||||||
<KeycloakTextInput
|
<Controller
|
||||||
ref={register()}
|
|
||||||
type="text"
|
|
||||||
id="kc-dateFrom"
|
|
||||||
name="dateFrom"
|
name="dateFrom"
|
||||||
className="pf-c-form-control pf-m-icon pf-m-calendar"
|
control={control}
|
||||||
placeholder="yyyy-MM-dd"
|
render={({ onChange, value }) => (
|
||||||
data-testid="dateFrom-searchField"
|
<DatePicker
|
||||||
|
className="pf-u-w-100"
|
||||||
|
value={value}
|
||||||
|
onChange={(value) => onChange(value)}
|
||||||
|
inputProps={{ id: "kc-dateFrom" }}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<FormGroup
|
<FormGroup
|
||||||
|
@ -342,14 +346,17 @@ export default function EventsSection() {
|
||||||
fieldId="kc-dateTo"
|
fieldId="kc-dateTo"
|
||||||
className="keycloak__events_search__form_label"
|
className="keycloak__events_search__form_label"
|
||||||
>
|
>
|
||||||
<KeycloakTextInput
|
<Controller
|
||||||
ref={register()}
|
|
||||||
type="text"
|
|
||||||
id="kc-dateTo"
|
|
||||||
name="dateTo"
|
name="dateTo"
|
||||||
className="pf-c-form-control pf-m-icon pf-m-calendar"
|
control={control}
|
||||||
placeholder="yyyy-MM-dd"
|
render={({ onChange, value }) => (
|
||||||
data-testid="dateTo-searchField"
|
<DatePicker
|
||||||
|
className="pf-u-w-100"
|
||||||
|
value={value}
|
||||||
|
onChange={(value) => onChange(value)}
|
||||||
|
inputProps={{ id: "kc-dateTo" }}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<ActionGroup>
|
<ActionGroup>
|
||||||
|
|
Loading…
Reference in a new issue