In my Angular 8 project, I have two input fields for the start date and end date. I want to ensure that the end date is always equal to or greater than the start date.
I am utilizing both Angular 8 and ng module in my development process.
I've extracted data from myfile.json to create the text fields and used my custom date validation function (validation.ts) within the HTML formly code.
As a beginner Angular developer, I am seeking assistance on validating these two dates effectively.
json code
{
"className": "col-md-6 col-xs-12",
"key": "graduationstartdate",
"type": "input",
"templateOptions": {
"label": "Course start Date",
"appearance": "outline"
}
},
{
"className": "col-md-6 col-xs-12",
"key": "graduationenddate",
"type": "input",
"templateOptions": {
"label": "Course End Date",
"appearance": "outline"
}
validation.ts
it contains a function to validate the date
form.html
contains formly code of form