Validation on Selection of Past Date With ‘lightning:input’ Tag In Lightning Component

Hi Guys, today, in this post we are going to learn about how we can we add validation on selection of  past date in with ‘lightning:input‘ date type tag with datepicker, in salesforce lightning component with client side JavaScript.
validation on selection of past date

Step 1 : Create Lightning Component : dateValidation.cmp

From Developer Console >> File >> New >> Lightning Compoenent

  • check code comments.
Component javaScript controller : dateValidationController.js 

  • check code comments
Step 2 : Create Lightning Application for Testing: demo.app

From Developer Console >> File >> New >> Lightning Application

Output :

validation on selection of past date

Check also : Custom Email Field Validation in Salesforce Lightning Component

Related Resource :

Like our facebook page for new post updates. & Don’t forget to bookmark this site for your future reference.

if you have any suggestions or issue with it, you can share your thoughts  in comment box.

Happy Learning 🙂

(Visited 13,785 times, 1 visits today)

10 thoughts on “Validation on Selection of Past Date With ‘lightning:input’ Tag In Lightning Component”

Leave a Comment