mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Reset the date shortcut checkbox on value changes when it's not the shortcut value
This commit is contained in:
parent
c5b8893008
commit
931dc9d243
@ -14,6 +14,14 @@ 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");
|
||||
if (value != shortcutValue && $("#datetimepicker-shortcut").is(":checked"))
|
||||
{
|
||||
$("#datetimepicker-shortcut").click();
|
||||
}
|
||||
}
|
||||
|
||||
var startDate = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user