title: sap.m.Input with Float type
body: <p>My requirement is to have a textbox that can accept only floating point numbers up to two decimals only.</p>
  
  <p>How to fix below problems:</p>
  
  <ol>
  <li>I am unable to type anything like 20.01 but I am able to type 20.10.
  So when you start typing 0 after decimal point, it doesn't let you
  do that. </li>
  <li>When I start typing 66.66 -> after this if you press 6 one
  more time it starts rounding off the last decimal. My requirement is
  not to allow the user to type anything else after last two decimal
  digits.</li>
  </ol>
  
  <p>Below is my code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>sap.ui.getCore().setModel(new sap.ui.model.json.JSONModel(), "myModel");
  sap.ui.getCore().getModel("myModel").setProperty("/Amount")
  var textbox = new sap.m.Input({
    valueLiveUpdate: true,
    type: "Number",
  }).placeAt("content");
  textbox.bindProperty("value", {
    path: "myModel&gt;/Amount",
    type: new sap.ui.model.type.Float({
      minIntegerDigits: 1,
      maxFractionDigits: 2,
      groupingEnabled: false
    }, {
      minimum: 1,
      maximum: 2000
    })
  });
  textbox.attachValidationError(function(e) {
    e.getParameter("element").setValueState("Error");
    e.getParameter("element").setValueStateText(e.getParameter("message"));
  });
  textbox.attachParseError(function(e) {
    e.getParameter("element").setValueState("Error");
    e.getParameter("element").setValueStateText(e.getParameter("message"));
  });
  textbox.attachFormatError(function(e) {
    e.getParameter("element").setValueState("Error");
    e.getParameter("element").setValueStateText(e.getParameter("message"));
  });
  textbox.attachValidationSuccess(function(e) {
    e.getParameter("element").setValueState("Success");
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
    &lt;script src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js" id="sap-ui-bootstrap" data-sap-ui-theme="sap_bluecrystal" data-sap-ui-libs="sap.m"&gt;&lt;/script&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;meta name="viewport" content="width=device-width"&gt;
    &lt;title&gt;JS Bin&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;div id="content" /&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>