0

I have two objects (dates)

{{vm.currentDate|date:'mediumDate'}} and {{vm.anotherDate|date:'mediumDate'}}

How to equal (if are the same) and value this operation sent to directive in button

<button type="submit"  ng-show="VALUE_FROM_OPERATION"></button> 
Kannan Thangadurai
  • 1,117
  • 2
  • 17
  • 36
  • 2
    Possible duplicate of [Compare two dates with JavaScript](https://stackoverflow.com/questions/492994/compare-two-dates-with-javascript) – the_mishra Jul 25 '17 at 10:15

1 Answers1

1

You check if they are equal like this:

+currentDate === +anotherDate
Sebastián Espinosa
  • 2,123
  • 13
  • 23