title: isEnabled() function not working in Protractor
body: <p>I want to select a date in calendar picker using protractor. Below is the snippet of code, that I have written in my script:</p>
  
  <pre><code>if (dat &lt;= 24) {
      var us_dat = element(by.xpath("(//a[text()='" + dat + "'])[1]"));
  } else {
      var us_dat = element(by.xpath("(//a[text()='" + dat + "'])[1]"));
      if (us_dat.isEnabled() == false) {
          var us_dat = element(by.xpath("(//a[text()='" + dat + "'])[2]"));
      }
  }
  
  us_dat.click();
  browser.sleep(1000);
  </code></pre>
  
  <p>where <code>dat</code> is a variable, where I have stored the date that needs to be selected in the calendar picker.</p>
  
  <p>During debugging, I found that, when the date is greater than 24, the code is checking the "if" block present under the "else" block. However, it returns a value of undefined and hence it is skipping the action written inside the "if" block. May I know why it is returning a value of "undefined", instead of true or false please?</p>
  
  <p>Please let me know if any further details are required.</p>