mirror of
https://github.com/grocy/grocy.git
synced 2026-04-06 21:06:15 +02:00
datetimepicker: Fix that SetValue did not set the value if "shortcut-checkbox" (e.g. "never expires") was checked.
This commit is contained in:
parent
515da5d27f
commit
9f9acb7f1c
|
|
@ -12,9 +12,6 @@ Grocy.Components.DateTimePicker.GetValue = function()
|
|||
|
||||
Grocy.Components.DateTimePicker.SetValue = function(value)
|
||||
{
|
||||
Grocy.Components.DateTimePicker.GetInputElement().val(value);
|
||||
Grocy.Components.DateTimePicker.GetInputElement().trigger('change');
|
||||
|
||||
// "Click" the shortcut checkbox when the desired value is
|
||||
// not the shortcut value and it is currently set
|
||||
var shortcutValue = $("#datetimepicker-shortcut").data("datetimepicker-shortcut-value");
|
||||
|
|
@ -22,6 +19,8 @@ Grocy.Components.DateTimePicker.SetValue = function(value)
|
|||
{
|
||||
$("#datetimepicker-shortcut").click();
|
||||
}
|
||||
Grocy.Components.DateTimePicker.GetInputElement().val(value);
|
||||
Grocy.Components.DateTimePicker.GetInputElement().trigger('change');
|
||||
|
||||
Grocy.Components.DateTimePicker.GetInputElement().keyup();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user