mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Auto "click" the shortcut checkbox when manually entering the shortcut date (references #40)
This commit is contained in:
parent
bb5dcb2434
commit
bc7afe4bdd
@ -159,6 +159,14 @@ Grocy.Components.DateTimePicker.GetInputElement().on('keyup', function(e)
|
||||
element.setCustomValidity("");
|
||||
}
|
||||
}
|
||||
|
||||
// "Click" the shortcut checkbox when the shortcut value was
|
||||
// entered manually and it is currently not set
|
||||
var shortcutValue = $("#datetimepicker-shortcut").data("datetimepicker-shortcut-value");
|
||||
if (value == shortcutValue && !$("#datetimepicker-shortcut").is(":checked"))
|
||||
{
|
||||
$("#datetimepicker-shortcut").click();
|
||||
}
|
||||
});
|
||||
|
||||
Grocy.Components.DateTimePicker.GetInputElement().on('input', function(e)
|
||||
|
Loading…
x
Reference in New Issue
Block a user