I'm attempting to add a min and max for an integer style numericTextBox using Razor etc
I can see the values getting set to the correct values using console.debug, but the widget does not respect those limits.
I also tried having an onLoad function to set the min and max but that does the same thing..
Any ideas on this one ?
<input type="text" id="@(Model.DisplayNumber)" name='answer' value='@answerValue' class="number-only" />
<script type="text/javascript">
$(document).ready(function () {
var numericTextBox = $("#@(Model.DisplayNumber)").kendoNumericTextBox({
format: "#",
decimals: 0
});
if (@Model.RangeMin != null)
numericTextBox.min = @Model.RangeMin;
if (@Model.RangeMax != null)
numericTextBox.min = @Model.RangeMax;
});
Should have mentioned, this works fine but doesn't check whether the min and max have any values..
I can see the values getting set to the correct values using console.debug, but the widget does not respect those limits.
I also tried having an onLoad function to set the min and max but that does the same thing..
Any ideas on this one ?
<input type="text" id="@(Model.DisplayNumber)" name='answer' value='@answerValue' class="number-only" />
<script type="text/javascript">
$(document).ready(function () {
var numericTextBox = $("#@(Model.DisplayNumber)").kendoNumericTextBox({
format: "#",
decimals: 0
});
if (@Model.RangeMin != null)
numericTextBox.min = @Model.RangeMin;
if (@Model.RangeMax != null)
numericTextBox.min = @Model.RangeMax;
});
Should have mentioned, this works fine but doesn't check whether the min and max have any values..
$(document).ready(function () {
$("#@(Model.DisplayNumber)").kendoNumericTextBox(
{min: @Model.RangeMin, max: @Model.RangeMax, format: "#", decimals: 0})
});
Ok I'll try a different question. When an object is retrieved back from the Datastore, you cannot change it ?
In other words the "numericTextBox" cannot be altered by .min= etc.. Or, do I have to save it back, Or I need to set the min and max in a different way.
Please let me know if I'm wasting more time and this just isn't possible yet, Or if it's coming and when it does it will be done a different way... anyone out there ?