Skip to content

Instantly share code, notes, and snippets.

@krimple
Created November 26, 2011 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krimple/1395855 to your computer and use it in GitHub Desktop.
Save krimple/1395855 to your computer and use it in GitHub Desktop.
<div>
<label for="maxcap">Max Capacity : </label>
<form:input path="maximumCapacity"
id="maxcap" />
<script type="text/javascript">
dojo.require("dijit.form.NumberSpinner");
dojo.addOnLoad(function() {
var maxCapSpinner =
new dijit.form.NumberSpinner({
smallDelta: 1,
value: dojo.byId("maxcap").value,
intermediateChanges: true,
constraints: {
min: 1,
max: 90,
places: 0
},
}, "maxcap");
});
</script>
<form:errors cssClass="errors" path="maximumCapacity" />
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment