Skip to main content

Posts

Showing posts from July, 2019

Date Validation in Lightning Compononents

In this post we are going to see how we can validate the date for any form which takes some input along with the date. For Example you are enrolling yourself of the some concert on certain date in the events portal and you are submitting your attendance confirmation for this event. So in this case you cannot select the past dates for the events which you will be attending. Lets see how we can validate this in Lightning component. Step 1: Create a lightning component . Launch the Developer Console, Goto  File > New > Lightning Component _________________________________________________________________________ <aura:component>     <!--create myDate aura attribute for store date field value-->       <aura:attribute name="myDate" type="date" />     <!--create dateValidationError boolean attribute for show error msg on invalid selection       and disable submit button -->         <aura:attribute name="dat