Dear,
I have noticed that current release is not usable as the timeformat is
wrong for the datetimepicker.
Attached is a patch (extract from our local Git repository).
Yours sincerely
--
Chloé Desoutter
C[A-Z]O, Atasta NET
>From e0b42d558522c9afd0c8cc45a08c1b5e577e7e0d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Chlo=C3=A9=20Desoutter?= <[email protected]>
Date: Fri, 5 Sep 2014 14:46:08 +0200
Subject: [PATCH] Fixed timeformat (HH > hh)
---
.../framework/widget/templates/htmlFormMacroLibrary.ftl | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/apache-ofbiz-12.04.04/framework/widget/templates/htmlFormMacroLibrary.ftl b/apache-ofbiz-12.04.04/framework/widget/templates/htmlFormMacroLibrary.ftl
index ceda2d8..4263129 100644
--- a/apache-ofbiz-12.04.04/framework/widget/templates/htmlFormMacroLibrary.ftl
+++ b/apache-ofbiz-12.04.04/framework/widget/templates/htmlFormMacroLibrary.ftl
@@ -129,14 +129,14 @@ under the License.
if (initDate.indexOf('.') != -1) {
initDate = initDate.substring(0, initDate.indexOf('.'));
}
- var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd HH:mm:ss</#if>";
+ var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd hh:mm:ss</#if>";
var dateObj = Date.parseExact(initDate, ofbizTime);
var formatedObj = dateObj.toString(dateFormat);
jQuery("#${id}_i18n").val(formatedObj);
}
jQuery("#${id}").change(function() {
- var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd HH:mm:ss</#if>";
+ var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd hh:mm:ss</#if>";
var newValue = ""
if (this.value != "") {
var dateObj = Date.parseExact(this.value, ofbizTime);
@@ -150,7 +150,7 @@ under the License.
var newValue = ""
if (this.value != "") {
var dateObj = Date.parseExact(this.value, dateFormat);
- var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd HH:mm:ss</#if>";
+ var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd hh:mm:ss</#if>";
newValue = dateObj.toString(ofbizTime);
}
jQuery("#${id}").val(newValue);
@@ -171,7 +171,7 @@ under the License.
jQuery("#${id}").datetimepicker({
showSecond: true,
<#-- showMillisec: true, -->
- timeFormat: 'HH:mm:ss',
+ timeFormat: 'hh:mm:ss',
stepHour: 1,
stepMinute: 1,
stepSecond: 1,
--
2.0.0