I've encountered an issue while using ng-show
in a page that I'm currently designing:
<td ng-show="week.EndDate > controller.currentDate">
The week
object has a property called EndDate
, and the value of currentDate
is being set in my controller:
currentDate = new Date();
My ng-show
directive fails whether I use >, <, or = when comparing dates. Upon inspecting the values of my dates, here's what they look like:
week.Date = 2014-11-07 controller.currentDate = 2015-07-09T21:54:40.655Z
I'm unsure if the issue stems from the difference in date format. If so, how can I resolve this? If not, is there an alternative method for comparing dates?