2020-08-30 12:18:16 +02:00
|
|
|
$(".numberpicker-down-button").unbind('click').on("click", function()
|
2018-09-08 12:04:31 +02:00
|
|
|
{
|
2020-10-18 14:27:23 +02:00
|
|
|
var inputElement = $(this).parent().parent().find('input[type="number"]');
|
|
|
|
inputElement.val(parseFloat(inputElement.val()) - 1);
|
|
|
|
inputElement.trigger('keyup');
|
|
|
|
inputElement.trigger('change');
|
2018-09-08 12:04:31 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
$(".numberpicker-up-button").unbind('click').on("click", function()
|
|
|
|
{
|
2020-10-18 14:27:23 +02:00
|
|
|
var inputElement = $(this).parent().parent().find('input[type="number"]');
|
|
|
|
inputElement.val(parseFloat(inputElement.val()) + 1);
|
|
|
|
inputElement.trigger('keyup');
|
|
|
|
inputElement.trigger('change');
|
2018-09-08 12:04:31 +02:00
|
|
|
});
|
2019-05-03 19:08:54 +02:00
|
|
|
|
|
|
|
$(".numberpicker").on("keyup", function()
|
|
|
|
{
|
2020-11-12 21:35:10 +01:00
|
|
|
if ($(this).attr("data-not-equal") && !$(this).attr("data-not-equal").toString().isEmpty() && $(this).attr("data-not-equal") == $(this).val())
|
2019-05-03 19:08:54 +02:00
|
|
|
{
|
|
|
|
$(this)[0].setCustomValidity("error");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$(this)[0].setCustomValidity("");
|
|
|
|
}
|
|
|
|
});
|