title: Change the input type on focus in angular
body: <pre><code>&lt;input type = "text" (focus)="this.type='date'"&gt;
  </code></pre>
  
  <p>Changing the input type when the user focuses on input field, default type is text.</p>
  
  <p>For example this works in plain javascript, the type remains as text until the user moves the cursor inside the input field</p>
  
  <pre><code>&lt;input type = "text" onFocus="this.type='date'"&gt; 
  </code></pre>