Following is my jquery code, I want to compare the date pick by user with my gstdate.

```
$('#FromDate').on('blur', function() {
  var fromdate = $('#FromDate').val();
  var gstdate = "1-7-2017";
  var gd = new Date('d-m-Y', gstdate);

  if (fromdate <= gst) {
    //do something..
  } else {
    //do something..
  }
});

```