Search code examples
moqui

value of fromDate field in a linkFormForm is in format of "2014-02-27 06:36:09.956" rather than plain string like "1393454169956"


When use link inside of a form-list for delete a record, the fromDate which is a date-time field keeps a formatted value in hidden form as below. In the example of demo.moqui.org, it is a plain string like "1393454169956". The formatted one has problem since it is timezone related.

<input type="hidden" value="TEST1" name="exampleId">
<input type="hidden" value="2014-02-27 06:36:09.956" name="fromDate">
<input type="hidden" value="100001" name="exampleFeatureId">

So How to make it as plain string?


Solution

  • There is an improvement in Moqui Framework in commit #10d9e00: Changed URL parameters to use the same method as hidden form fields for the parameter value. For links rendered as hidden forms, which this question is based on, this will improve the behavior.

    In general Moqui both formats and parses date/time values using the current user's time zone. If there are any exceptions to that found (like this one) it is a bug.