Month year comparison in javascript
<p>I have two input fields in which we enter Month-year. And display data in graph representation.
 Field1:Jan-2016
 Field2:Jan-2015</p>

<p>I have to compare and this fields and if Field1>Field2 then alert message has to display.</p>

<p>How to do the comparison in java script</p>

<p>Input type format is Month-year</p>