I want to display a picture in angular. There is a start date and end date. Pic should be up by start date and down by end date.
Basically, if today is the start date the pic should be up till the end date.
I have all the pieces but I can’t fit them together
const startDate = new Date('02/28/2021'); const endDate = new Date('02/29/2021'); let todaysDate = new Date();
to get the numeric values of the date you can either use
No need to worry about the html or other part of the code. Just a boolean would do.
if(condition) return true; // which would mean display the pic