jqwidgets-scripts-custom
Version:
jQWidgets is an advanced jQuery, Angular 7, Vue, React, ASP .NET MVC, Custom Elements and HTML5 UI framework.
36 lines (33 loc) • 1.93 kB
HTML
<html lang="en">
<head>
<title id='Description'>FormattedInput Custom Element Validation</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1 minimum-scale=1" />
<meta name="description" content="This is an example of a restriced input in Custom Elementс FormattedInput." />
<link rel="stylesheet" href="../../../jqwidgets/styles/jqx.base.css" type="text/css" />
<link rel="stylesheet" href="../../../styles/demos.css" type="text/css" />
<script type="text/javascript" src="../../../scripts/webcomponents-lite.min.js"></script>
<script type="text/javascript" src="../../../jqwidgets/jqxcore.js"></script>
<script type="text/javascript" src="../../../jqwidgets/jqxcore.elements.js"></script>
<script type="text/javascript" src="../../../jqwidgets/jqxformattedinput.js"></script>
<script type="text/javascript" src="../../../scripts/demos.js"></script>
<script type="text/javascript">
JQXElements.settings['formattedInputSettings'] =
{
radix: 'decimal',
value: '0',
min: '0',
max: '1000',
spinButtons: true
}
</script>
</head>
<body>
<div class="example-description">
In this Custom element FormattedInput demo the input is restricted from 0 to 1000 (decimal). When the user enters a value whose decimal equivalent is not from 0 to 1000, the Custom element FormattedInput automatically updates the value to the chosen numeral system's equivalent of 0 or 1000 depending on whether the value's decimal equivalent is below 0 or above 1000. That happens on blur event or Enter keypress.
</div>
<jqx-formatted-input settings="formattedInputSettings">
</jqx-formatted-input>
</body>
</html>