isc Version: v12.0p_2019-01-21/Enterprise Deployment
GWT Version: 2.7.0
Browser: Chrome Version 71.0.3578.98 (Official Build) (64-bit)
OS: Windows 10
SuperDevMode
Hello, I am seeing a problem when attempting to save 12-hour DateTime items after using DateUtil.autoDetectFormats() when the locale is "en". Below are the steps to reproduce this by modifying the built-in-ds sample to include a datetime field.
Step 1: Convert supplyItem.nextShipment to datetime
a. In war/WEB-INF/db/hsqldb/isomorphic.script, replace all occurences of "NEXTSHIPMENT DATE" with "NEXTSHIPMENT TIMESTAMP"
b. In war/ds/supplyItem.ds.xml, change type of nextShipment field from "date" to "datetime"
c. Create a new record and select a Next Shipment date using the date picker. The date is in 24-hour format and saves without errors.
Step 2: Set up "en" GWT locale, and detect date format automatically
a. At the bottom of BuiltInDS.gwt.xml, add these lines:
b. In BuiltInDS.java, add this line to the beginning of onModuleLoad():
c. Create a new record and select a Next Shipment date using the date picker. The date is in 12-hour format, and gives an error of "Must be a date" when attempting to save. No javascript errors are present in the console and no network traffic is observed (aside from the loading of the error icon).
Any suggestions you have would be appreciated! It seems like it nothing I did should prevent the field from saving, but I might be missing a step that needs to be happen after using autoDetectFormats(), I'm not sure.
(After a quick peek in the debug modules, it looks like isc.DateUtil._splitDateString() will only accept lowercase "am/pm", while the field is formatted with uppercase. Is there some additional configuration I need to do to the datetime field to ensure that it uses a compatible format?)
Thank you!
GWT Version: 2.7.0
Browser: Chrome Version 71.0.3578.98 (Official Build) (64-bit)
OS: Windows 10
SuperDevMode
Hello, I am seeing a problem when attempting to save 12-hour DateTime items after using DateUtil.autoDetectFormats() when the locale is "en". Below are the steps to reproduce this by modifying the built-in-ds sample to include a datetime field.
Step 1: Convert supplyItem.nextShipment to datetime
a. In war/WEB-INF/db/hsqldb/isomorphic.script, replace all occurences of "NEXTSHIPMENT DATE" with "NEXTSHIPMENT TIMESTAMP"
b. In war/ds/supplyItem.ds.xml, change type of nextShipment field from "date" to "datetime"
c. Create a new record and select a Next Shipment date using the date picker. The date is in 24-hour format and saves without errors.
Step 2: Set up "en" GWT locale, and detect date format automatically
a. At the bottom of BuiltInDS.gwt.xml, add these lines:
Code:
<extend-property name="locale" values="en"/> <set-property-fallback name="locale" value="en"/>
Code:
DateUtil.autoDetectFormats();
Any suggestions you have would be appreciated! It seems like it nothing I did should prevent the field from saving, but I might be missing a step that needs to be happen after using autoDetectFormats(), I'm not sure.
(After a quick peek in the debug modules, it looks like isc.DateUtil._splitDateString() will only accept lowercase "am/pm", while the field is formatted with uppercase. Is there some additional configuration I need to do to the datetime field to ensure that it uses a compatible format?)
Thank you!
Comment