The hour selector in the popup always uses the default timeFormat of "24". I created a patch that chooses "12" or "24" depending on whether the format pattern contains a "%p". Unfortunately I'm new to git(hub) and I'm not sure how to go on now, but as the change is a one-liner I'll just write it down here:
From c575952f11c34940a5b382e46863189a69a061b1 Mon Sep 17 00:00:00 2001
From: Jochen Berger <fooberger@googlemail.com>
Date: Fri, 20 Aug 2010 13:26:57 +0200
Subject: [PATCH 1/2] use 12- or 24-hour time format depending on format pattern
---
.../tapx/datefield/tapx-datefield.js | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/tapx-datefield/src/main/resources/com/howardlewisship/tapx/datefield/tapx-datefield.js b/tapx-datefield/src/main/resources/com/howardlewisship/tapx/datefield/tapx-datefield.js
index c81de65..168f610 100644
--- a/tapx-datefield/src/main/resources/com/howardlewisship/tapx/datefield/tapx-datefield.js
+++ b/tapx-datefield/src/main/resources/com/howardlewisship/tapx/datefield/tapx-datefield.js
@@ -6,6 +6,7 @@ Tapestry.Initializer.tapxDateField = function(spec)
weekNumbers : false,
showsTime : spec.time,
ifFormat : spec.clientDateFormat,
+ timeFormat : spec.time && spec.clientDateFormat.match("%p") != null ? "12" : "24",
cache : true
});
}
\ No newline at end of file
--
1.7.0.4
The hour selector in the popup always uses the default timeFormat of "24". I created a patch that chooses "12" or "24" depending on whether the format pattern contains a "%p". Unfortunately I'm new to git(hub) and I'm not sure how to go on now, but as the change is a one-liner I'll just write it down here: