|
|
@ -126,7 +126,7 @@ function NumberPickerWidget:init()
|
|
|
|
callback_input = function()
|
|
|
|
callback_input = function()
|
|
|
|
input_dialog = InputDialog:new{
|
|
|
|
input_dialog = InputDialog:new{
|
|
|
|
title = _("Enter number"),
|
|
|
|
title = _("Enter number"),
|
|
|
|
input = self.formatted_value,
|
|
|
|
input_hint = T("%1 (%2 - %3)", self.formatted_value, self.value_min, self.value_max),
|
|
|
|
input_type = "number",
|
|
|
|
input_type = "number",
|
|
|
|
buttons = {
|
|
|
|
buttons = {
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -140,7 +140,6 @@ function NumberPickerWidget:init()
|
|
|
|
text = _("OK"),
|
|
|
|
text = _("OK"),
|
|
|
|
is_enter_default = true,
|
|
|
|
is_enter_default = true,
|
|
|
|
callback = function()
|
|
|
|
callback = function()
|
|
|
|
input_dialog:closeInputDialog()
|
|
|
|
|
|
|
|
local input_value = tonumber(input_dialog:getInputText())
|
|
|
|
local input_value = tonumber(input_dialog:getInputText())
|
|
|
|
if input_value and input_value >= self.value_min and input_value <= self.value_max then
|
|
|
|
if input_value and input_value >= self.value_min and input_value <= self.value_max then
|
|
|
|
self.value = input_value
|
|
|
|
self.value = input_value
|
|
|
|