-
get Year only from input field type="date" in lightning component controller
hi,
can we get only year value from input whose type is DATE in controller.js
like
<lightning:input type="Date" label="DOB" value="{!v.CustomerRecord.DOB__c}" required="true" aura:id="DOB" />var date=component.find('DOB').get('v.value');
i want to do age comparison ,plz provide any proper solution..
Log In to reply.
Popular Salesforce Blogs
Salesforce Implementation: In House vs Outsource
Introduction Salesforce is the leading cloud-based customer relationship management solution in the world, and it enables organizations to monitor and connect with current and potential…
Comparing Salesforce Orgs Since 2015: How BOFC Helped Define Metadata Management Before It Was a Category
Every Salesforce Admin eventually runs into the same question: two orgs, and no reliable way to know what's actually different between them. A sandbox drifts…
9 Common Business Problems Solved via Salesforce Consulting Services: Full Guide
9 Common Business Problems Solved via Salesforce Consulting Services: Full Guide Introduction: Get the Key to Business Growth with Salesforce Consulting Services The modern company is under…
Popular Salesforce Videos
Highlights of the Salesforce Winter '22 Release for Nonprofits
The video includes both Winter ‘22 Salesforce Platform updates and Nonprofit Cloud tools. Chapters: 0:00 General Salesforce.com Platform Updates 8:13 Salesforce.com Release for Fundraising and…
Custom Types in Lightning-datatable | Interchange | Salesforce Tutorial
First episode of our new Interchange series, in which we will deep dive in how to define custom types for a lightning-datatable component. Concretely, we’ll…
Design Patterns and Best Practices to Build Reusable Lightning Web Components | Salesforce Tutorial
LWC Best Practices & Design Pattern Component Architecture and Composition Styling Reusable components Sharing components between LWC and LWC OSS Packaging LWC and LWC OSS…