edited body
Source Link

You should add these in your codes;

//Component

<lightning:input type="date" value="{!v.objContact.Birthdate}" label="Date of Birth" onchange="{!c.dateController}"/>

//JS Controller

 dateController : function(component, event, helper){
    var today = $A.localizationService.formatDate(new Date(), "YYYY-MM-DD");
    var dateValue = component.get("v.objContact.BirthdateBirthdate");
    console.log(today);
    
    if(dateValue <> today){
        alert('You can not enter grater than today!');
        dateValue = null;
        component.set("v.objContact.Birthdate", dateValue);
    }
}

You should add these in your codes;

//Component

<lightning:input  value="{!v.objContact.Birthdate}" label="Date of Birth" onchange="{!c.dateController}"/>

//JS Controller

 dateController : function(component, event, helper){
    var today = $A.localizationService.formatDate(new Date(), "YYYY-MM-DD");
    var dateValue = component.get("v.objContact.Birthdate);
    console.log(today);
   
    if(dateValue < today){
        alert('You can not enter grater than today!');
        dateValue = null;
        component.set("v.objContact.Birthdate", dateValue);
    }
}

You should add these in your codes;

//Component

<lightning:input type="date" value="{!v.objContact.Birthdate}" label="Date of Birth" onchange="{!c.dateController}"/>

//JS Controller

 dateController : function(component, event, helper){
    var today = $A.localizationService.formatDate(new Date(), "YYYY-MM-DD");
    var dateValue = component.get("v.objContact.Birthdate");
    console.log(today);
    
    if(dateValue > today){
        alert('You can not enter grater than today!');
        dateValue = null;
        component.set("v.objContact.Birthdate", dateValue);
    }
}
added 31 characters in body
Source Link

You should add these in your codes;

//Component

<lightning:input  value="{!v.objContact.Birthdate}" label="Date of Birth" onchange="{!c.dateController}"/>

//JS Controller

 dateController : function(component, event, helper){
    var today = $A.localizationService.formatDate(new Date(), "YYYY-MM-DD");
    var dateValue = component.get("v.objContact.Birthdate);
    console.log(today);
   
    if(dateValue < today){
        alert('You can not enter grater than today!');
        dateValue = null;
        component.set("v.objContact.Birthdate", dateValue);
    }
}

You should add these in your codes;

//Component

<lightning:input  value="{!v.objContact.Birthdate}" label="Date of Birth"/>

//JS Controller

 dateController : function(component, event, helper){
    var today = $A.localizationService.formatDate(new Date(), "YYYY-MM-DD");
    var dateValue = component.get("v.objContact.Birthdate);
    console.log(today);
   
    if(dateValue < today){
        alert('You can not enter grater than today!');
        dateValue = null;
        component.set("v.objContact.Birthdate", dateValue);
    }
}

You should add these in your codes;

//Component

<lightning:input  value="{!v.objContact.Birthdate}" label="Date of Birth" onchange="{!c.dateController}"/>

//JS Controller

 dateController : function(component, event, helper){
    var today = $A.localizationService.formatDate(new Date(), "YYYY-MM-DD");
    var dateValue = component.get("v.objContact.Birthdate);
    console.log(today);
   
    if(dateValue < today){
        alert('You can not enter grater than today!');
        dateValue = null;
        component.set("v.objContact.Birthdate", dateValue);
    }
}
deleted 223 characters in body
Source Link

I need some answers to understand correctly;

Will you display only the field value on contact or will you take an input values from user? If you will not take an input, youYou should use either with spesification which is "disabled", or lightning:output.

If you want to show an alert foradd these people, you dont need to use lightning:input. Use below code;in your codes;

init//Component

<lightning:input  value="{!v.objContact.Birthdate}" label="Date of Birth"/>

//JS Controller

 dateController : function(component, event, helper) {
 
    var today = $A.localizationService.formatDate(new Date(), "YYYY-MM-DD");
 
    var actiondateValue = component.get("c"v.getInitialValues"objContact.Birthdate);
action.setParams({"recordId": component   console.getlog("v.recordId")}today); 
    
  
action.setCallback(this, function if(response)dateValue < today){
    var result = response.getReturnValue alert();

'You can not enter if(result.birthDaygrater ==than today!'){;
        alert('HappydateValue BirthDay');= //null;
 Or you can use toast message alert component.set("v.objContact.Birthdate", dateValue);
    }
 
}

}

I need some answers to understand correctly;

Will you display only the field value on contact or will you take an input values from user? If you will not take an input, you should use either with spesification which is "disabled", or lightning:output.

If you want to show an alert for these people, you dont need to use lightning:input. Use below code;

init : function(component, event, helper) {
 
var today = $A.localizationService.formatDate(new Date(), "YYYY-MM-DD");
 
var action = component.get("c.getInitialValues");
action.setParams({"recordId": component.get("v.recordId")});     
action.setCallback(this, function(response) {
    var result = response.getReturnValue();

    if(result.birthDay == today){
        alert('Happy BirthDay'); // Or you can use toast message alert
    }
 
}

}

You should add these in your codes;

//Component

<lightning:input  value="{!v.objContact.Birthdate}" label="Date of Birth"/>

//JS Controller

 dateController : function(component, event, helper){
    var today = $A.localizationService.formatDate(new Date(), "YYYY-MM-DD");
    var dateValue = component.get("v.objContact.Birthdate);
    console.log(today); 
    
    if(dateValue < today){
        alert('You can not enter grater than today!');
        dateValue = null;
        component.set("v.objContact.Birthdate", dateValue);
    }
}
Source Link
Loading