You need to sign in to do that
Don't have an account?
Gopikrishna Dasari
Related to LWC
I have one date input field and we have some list of records when we enter the date filed. the date is grater than the enter date filed those records only want to show in display list how can we achieve this. In LWC any one can help me in this.
Can you elaborate bit more on the scenario?
Is there any logic which you have tried and facing any issues?
Thanks.
<template>
<lightning-input type="date" label="Enter Date" onchange={changeHandler}></lightning-input>
<div style="height: 300px;">
<lightning-datatable
key-field="id"
data={data}
columns={columns}>
</lightning-datatable>
</div>
</template>
import { LightningElement } from 'lwc';
import generateData from './generateData';
const columns = [
{ label: 'Label', fieldName: 'name' },
{ label: 'Website', fieldName: 'website', type: 'url' },
{ label: 'Phone', fieldName: 'phone', type: 'phone' },
{ label: 'Balance', fieldName: 'amount', type: 'currency' },
{ label: 'CloseAt', fieldName: 'closeAt', type: 'date' },
];
export default class BasicDatatable extends LightningElement {
data = [];
columns = columns;
connectedCallback() {
const data = generateData({ amountOfRecords: 100 });
this.data = data;
}
changehandler(){
}
}
Here we have one list of records and one input date field when we enter date in input field we have to check given date field is grater than in list of records date those records only we want to dispiay in list how can we write logic for this.
Thank you,
gopikrishna.
I have created below lwc component to query records having CreatedDate greater then entered date in input field.
HTML: JS: Apex class:
Hope this will be helpful.
Thanks!
You can try something like below:
If this information helps, please mark the answer as best. Thank you
Thanks for your answer.
Thanks,
Gopikrishna.
Thanks for your answer.
Thanks,
Gopikrishna.