Hi Isomorphic,
I have a problem with DateTimeItem for mobile.
SmartClient Version: v12.0p_2019-12-14/PowerEdition Deployment (built 2019-12-14)
Google Chrome Version 79.0.3945.117 (Official Build) (64-bit)
When exiting a DateTimeItem, the time value always increases by 1 hour.
Best regards
Pavo
I have a problem with DateTimeItem for mobile.
SmartClient Version: v12.0p_2019-12-14/PowerEdition Deployment (built 2019-12-14)
Google Chrome Version 79.0.3945.117 (Official Build) (64-bit)
When exiting a DateTimeItem, the time value always increases by 1 hour.
Code:
package com.smartgwt.sample.client; import com.google.gwt.core.client.EntryPoint; import com.smartgwt.client.core.KeyIdentifier; import com.smartgwt.client.types.Alignment; import com.smartgwt.client.util.Page; import com.smartgwt.client.util.PageKeyHandler; import com.smartgwt.client.util.SC; import com.smartgwt.client.widgets.IButton; import com.smartgwt.client.widgets.Window; import com.smartgwt.client.widgets.events.ClickEvent; import com.smartgwt.client.widgets.events.ClickHandler; import com.smartgwt.client.widgets.form.DynamicForm; import com.smartgwt.client.widgets.form.fields.DateTimeItem; import com.smartgwt.client.widgets.layout.VLayout; public class BuiltInDS extends VLayout implements EntryPoint { private IButton recreateBtn; public void onModuleLoad() { KeyIdentifier debugKey = new KeyIdentifier(); debugKey.setCtrlKey(true); debugKey.setKeyName("D"); Page.registerKey(debugKey, new PageKeyHandler() { public void execute(String keyName) { SC.showConsole(); } }); setWidth100(); setHeight100(); recreateBtn = new IButton("Recreate"); recreateBtn.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { new MyWindow().show(); } }); addMember(recreateBtn); new MyWindow().show(); draw(); } private class MyWindow extends Window { public MyWindow() { setWidth(400); setHeight(300); setMembersMargin(0); setModalMaskOpacity(70); setShowMinimizeButton(false); setIsModal(true); setShowModalMask(true); centerInPage(); CustomDateTimeItem dti1 = new CustomDateTimeItem(); CustomDateTimeItem dti2 = new CustomDateTimeItem(); DynamicForm dF = new DynamicForm(); dF.setFields(dti1, dti2); setMembers(dF); } } private class CustomDateTimeItem extends DateTimeItem { public CustomDateTimeItem() { setWidth("100%"); setTitleColSpan(1); setTextAlign(Alignment.CENTER); setAlign(Alignment.LEFT); setShowPickerIcon(true); setUseTextField(true); setShowHintInField(true); setBrowserInputType("datetime"); } } }
Pavo
Comment