Check date in the full calendar in event popup code

Support forumCategory: QuestionsCheck date in the full calendar in event popup code
sudarshan_dharankar asked 2 years ago
Hello, In the EA Settings -> Full Calendar Shortcode section, in the "Event content in popup" field, I have some condition to check the date. I want to show or not show some fields depending on whether the event is greater than current time and date.  I see example to compare string for example {if event.status == "pending"} but I am not sure how I can compare the date and / or time.  I also checked the 'full documentation' link at the bottom by going to the github link as well. But I was not able to figure out.  Can you please let me know if this is possible and if so, how I can do it?
1 Answers
Nikola Loncar Staff answered 2 years ago
Hi, can you please tell me what type of if statement you are trying to set that? Date/Time fields will be compared as strings. Best regards, Nikola
sudarshan_dharankar replied 2 years ago

Hello Nikola,

The logic I want to accomplish is as follows: If current date and time is less than the appointment date/start time, then I don’t want to show the ‘cancel’ link as it does not make any sense any more to cancel as it is in the past..