SyntaxFix
Write A Post
Hire A Developer
Questions
Your question answers itself ;) If og_date contains the date, it's probably a string, so og_date.value is undefined.
og_date
og_date.value
Simply use og_date.split('-') instead of og_date.value.split('-')
og_date.split('-')
og_date.value.split('-')