mirror of
https://github.com/grocy/grocy.git
synced 2025-08-14 17:54:40 +00:00
Allow empty date(time) inputs when the field is not required (fixes #462(
This commit is contained in:
@@ -221,7 +221,10 @@ Grocy.Components.DateTimePicker.GetInputElement().on('keyup', function(e)
|
||||
var element = Grocy.Components.DateTimePicker.GetInputElement()[0];
|
||||
if (!dateObj.isValid())
|
||||
{
|
||||
element.setCustomValidity("error");
|
||||
if ($(element).hasAttr("required"))
|
||||
{
|
||||
element.setCustomValidity("error");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user