Hi,
We can use Javascript code to validate dates on the Basic Form. For example purpose i have considered Account entity.
- Step 1: Add the below code to the Basic Form in Custom Javascript Section under the Additional Settings tab. And save it.

Below is the code you shown in above screenshot.Posting it here so that you can use as is in your Basic Form
$(document).ready(function() {
//Create date validator
var dateValidator = document.createElement('span');
//setup validator property and associated field
dateValidator.style.display = "none";
dateValidator.id = "DateFormatValidatortct_dateofdischarge";
dateValidator.controltovalidate = "tct_dateofdischarge"; //datetime field
dateValidator.evaluationfunction = function() {
var returnValue = true; //set default value as true
//get date of discharge
var dateofdischarge = $("#tct_dateofdischarge").val();
var converteddate=new Date(dateofdischarge);
var todaydate = new Date();
//check if entered date is todays date
if (converteddate.getDate() == todaydate.getDate() && converteddate.getMonth() == todaydate.getMonth() && converteddate.getFullYear() == todaydate.getFullYear()){
returnValue = false;
//setup custom validation message
this.errormessage = "<a href='#tct_dateofdischarge_label'> Date selected should be in the past</a>";
returnValue = false;
}
//check 1900 year
else if(converteddate.getFullYear() < 1900){
returnValue = false;
//setup custom validation message
this.errormessage = "<a href='#tct_dateofdischarge_label'> The Year In The Date Of Discharge cannot be less than 1900. So please change date</a>";
returnValue = false;
}
return returnValue;
};
// Add the validator to the page validators array:
Page_Validators.push(dateValidator);
// Wire up the click event handler of the validation summary link
$("a[href='#tct_dateofdischarge_label']").on("click", function() {
scrollToAndFocus('tct_dateofdischarge_label', 'tct_dateofdischarge');
});
});
- Step 2: Clear the portal cache and view the result.
If we Entered “Date of Discharged” today’s date then it will show the error validation message.

Error message:

- Step 3: If we Entered “Date of Discharged” earlier than 1900 year then it will show the error validation message.

Error Message :-

It validates for both earlier than 1900 or greater than today.
Hope this helps!!!
If you find this solution helpful, please mark it as accepted solution.
Thanks!
Inogic Professional Services
An expert technical extension for your techno-functional business needs
Power Platform/Dynamics 365 CRM
Drop an email at crm@inogic.com
Service: http://www.inogic.com/services/
Power Platform/Dynamics 365 CRM Tips and Tricks: http://www.inogic.com/blog/