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

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.
stop 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:

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

Output :

stop 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 3,611 times, 31 visits today)


Leave a Reply