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,
|
||||
Chip,
|
||||
ChipGroup,
|
||||
DatePicker,
|
||||
Dropdown,
|
||||
DropdownToggle,
|
||||
Flex,
|
||||
|
@ -416,14 +417,17 @@ export const AdminEvents = () => {
|
|||
fieldId="kc-dateFrom"
|
||||
className="keycloak__events_search__form_label"
|
||||
>
|
||||
<KeycloakTextInput
|
||||
ref={register()}
|
||||
type="text"
|
||||
id="kc-dateFrom"
|
||||
<Controller
|
||||
name="dateFrom"
|
||||
className="pf-c-form-control pf-m-icon pf-m-calendar"
|
||||
placeholder="yyyy-MM-dd"
|
||||
data-testid="dateFrom-searchField"
|
||||
control={control}
|
||||
render={({ onChange, value }) => (
|
||||
<DatePicker
|
||||
className="pf-u-w-100"
|
||||
value={value}
|
||||
onChange={(value) => onChange(value)}
|
||||
inputProps={{ id: "kc-dateFrom" }}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup
|
||||
|
@ -431,14 +435,17 @@ export const AdminEvents = () => {
|
|||
fieldId="kc-dateTo"
|
||||
className="keycloak__events_search__form_label"
|
||||
>
|
||||
<KeycloakTextInput
|
||||
ref={register()}
|
||||
type="text"
|
||||
id="kc-dateTo"
|
||||
<Controller
|
||||
name="dateTo"
|
||||
className="pf-c-form-control pf-m-icon pf-m-calendar"
|
||||
placeholder="yyyy-MM-dd"
|
||||
data-testid="dateTo-searchField"
|
||||
control={control}
|
||||
render={({ onChange, value }) => (
|
||||
<DatePicker
|
||||
className="pf-u-w-100"
|
||||
value={value}
|
||||
onChange={(value) => onChange(value)}
|
||||
inputProps={{ id: "kc-dateTo" }}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</FormGroup>
|
||||
<ActionGroup>
|
||||
|
|
|
@ -3,6 +3,7 @@ import {
|
|||
Button,
|
||||
Chip,
|
||||
ChipGroup,
|
||||
DatePicker,
|
||||
DescriptionList,
|
||||
DescriptionListDescription,
|
||||
DescriptionListGroup,
|
||||
|
@ -327,14 +328,17 @@ export default function EventsSection() {
|
|||
fieldId="kc-dateFrom"
|
||||
className="keycloak__events_search__form_label"
|
||||
>
|
||||
<KeycloakTextInput
|
||||
ref={register()}
|
||||
type="text"
|
||||
id="kc-dateFrom"
|
||||
<Controller
|
||||
name="dateFrom"
|
||||
className="pf-c-form-control pf-m-icon pf-m-calendar"
|
||||
placeholder="yyyy-MM-dd"
|
||||
data-testid="dateFrom-searchField"
|
||||
control={control}
|
||||
render={({ onChange, value }) => (
|
||||
<DatePicker
|
||||
className="pf-u-w-100"
|
||||
value={value}
|
||||
onChange={(value) => onChange(value)}
|
||||
inputProps={{ id: "kc-dateFrom" }}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup
|
||||
|
@ -342,14 +346,17 @@ export default function EventsSection() {
|
|||
fieldId="kc-dateTo"
|
||||
className="keycloak__events_search__form_label"
|
||||
>
|
||||
<KeycloakTextInput
|
||||
ref={register()}
|
||||
type="text"
|
||||
id="kc-dateTo"
|
||||
<Controller
|
||||
name="dateTo"
|
||||
className="pf-c-form-control pf-m-icon pf-m-calendar"
|
||||
placeholder="yyyy-MM-dd"
|
||||
data-testid="dateTo-searchField"
|
||||
control={control}
|
||||
render={({ onChange, value }) => (
|
||||
<DatePicker
|
||||
className="pf-u-w-100"
|
||||
value={value}
|
||||
onChange={(value) => onChange(value)}
|
||||
inputProps={{ id: "kc-dateTo" }}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</FormGroup>
|
||||
<ActionGroup>
|
||||
|
|
Loading…
Reference in a new issue