NumberPicker: correct max day in input dialog (#7803)

This commit is contained in:
hius07
2021-06-05 21:58:10 +03:00
committed by GitHub
parent 600c2bcf81
commit d8ea93662f

View File

@@ -124,6 +124,9 @@ function NumberPickerWidget:init()
local callback_input = nil
if self.value_table == nil then
callback_input = function()
if self.date_month and self.date_year then
self.value_max = self:getDaysInMonth(self.date_month:getValue(), self.date_year:getValue())
end
input_dialog = InputDialog:new{
title = _("Enter number"),
input_hint = T("%1 (%2 - %3)", self.formatted_value, self.value_min, self.value_max),