IDEMPIERE-925 Date field shows error for incorrect format but allow user to proceed on ok button / peer review
This commit is contained in:
parent
1a54f69c34
commit
e11d43b059
|
@ -1337,16 +1337,16 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
Object value = null;
|
Object value = null;
|
||||||
|
|
||||||
//Allowing Date validation before save
|
//Allowing Date validation before save
|
||||||
List<Component> compoList = cellQueryFrom.getChildren();
|
Component compo = cellQueryFrom.getFirstChild();
|
||||||
if(compoList.get(0) instanceof Datebox) {
|
if(compo instanceof Datebox) {
|
||||||
Datebox dbox = (Datebox)compoList.get(0);
|
Datebox dbox = (Datebox)compo;
|
||||||
if(dbox.getValue() != null)
|
if(dbox.getValue() != null)
|
||||||
value = new Timestamp(((Date)dbox.getValue()).getTime());
|
value = new Timestamp(((Date)dbox.getValue()).getTime());
|
||||||
}
|
}
|
||||||
else if(compoList.get(0) instanceof DatetimeBox) {
|
else if(compo instanceof DatetimeBox) {
|
||||||
DatetimeBox dtbox = (DatetimeBox)compoList.get(0);
|
DatetimeBox dtbox = (DatetimeBox)compo;
|
||||||
if(dtbox.getValue() != null)
|
if(dtbox.getValue() != null)
|
||||||
value = new Timestamp(((Date)dtbox.getValue()).getTime());
|
value = new Timestamp(((Date)dtbox.getValue()).getTime());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
value = cellQueryFrom.getAttribute("value");
|
value = cellQueryFrom.getAttribute("value");
|
||||||
|
@ -1391,16 +1391,16 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
ListCell cellQueryTo = (ListCell)row.getFellow("cellQueryTo"+row.getId());
|
ListCell cellQueryTo = (ListCell)row.getFellow("cellQueryTo"+row.getId());
|
||||||
|
|
||||||
//Allowing Date validation before save
|
//Allowing Date validation before save
|
||||||
compoList = cellQueryTo.getChildren();
|
compo = cellQueryTo.getFirstChild();
|
||||||
if(compoList.get(0) instanceof Datebox) {
|
if(compo instanceof Datebox) {
|
||||||
Datebox dbox = (Datebox)compoList.get(0);
|
Datebox dbox = (Datebox)compo;
|
||||||
if(dbox.getValue() != null)
|
if(dbox.getValue() != null)
|
||||||
value2 = new Timestamp(((Date)dbox.getValue()).getTime());
|
value2 = new Timestamp(((Date)dbox.getValue()).getTime());
|
||||||
}
|
}
|
||||||
else if(compoList.get(0) instanceof DatetimeBox) {
|
else if(compo instanceof DatetimeBox) {
|
||||||
DatetimeBox dtbox = (DatetimeBox)compoList.get(0);
|
DatetimeBox dtbox = (DatetimeBox)compo;
|
||||||
if(dtbox.getValue() != null)
|
if(dtbox.getValue() != null)
|
||||||
value2 = new Timestamp(((Date)dtbox.getValue()).getTime());
|
value2 = new Timestamp(((Date)dtbox.getValue()).getTime());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
value2 = cellQueryFrom.getAttribute("value");
|
value2 = cellQueryFrom.getAttribute("value");
|
||||||
|
|
Loading…
Reference in New Issue