IDEMPIERE-4487: Fixing issue that date time editor not showing time part. (#288)
This commit is contained in:
parent
3fa16637aa
commit
b8e9e455f1
|
@ -13,6 +13,7 @@
|
|||
package org.adempiere.webui.editor;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.util.Date;
|
||||
|
||||
|
@ -143,7 +144,7 @@ public class WDatetimeEditor extends WEditor implements ContextMenuListener
|
|||
{
|
||||
// Elaine 2008/07/25
|
||||
if(getComponent().getValue() == null) return null;
|
||||
return Timestamp.valueOf(getComponent().getDatebox().getValue().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
|
||||
return Timestamp.valueOf(getComponent().getValue().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
|
||||
//
|
||||
}
|
||||
|
||||
|
@ -157,7 +158,9 @@ public class WDatetimeEditor extends WEditor implements ContextMenuListener
|
|||
}
|
||||
else if (value instanceof Timestamp)
|
||||
{
|
||||
getComponent().getDatebox().setValueInLocalDateTime(((Timestamp)value).toLocalDateTime());
|
||||
LocalDateTime localTime =((Timestamp)value).toLocalDateTime();
|
||||
getComponent().getDatebox().setValueInLocalDateTime(localTime);
|
||||
getComponent().getTimebox().setValueInLocalDateTime(localTime);
|
||||
oldValue = (Timestamp)value;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue