summaryrefslogtreecommitdiff
path: root/rt/html/Elements/SelectDate
diff options
context:
space:
mode:
authorivan <ivan>2009-07-26 19:36:08 +0000
committerivan <ivan>2009-07-26 19:36:08 +0000
commitf83f9129cc2e67d20ef0d512cce9f0b327e26052 (patch)
tree5fe16fc5bba4e75170d310cd99080226534a9d27 /rt/html/Elements/SelectDate
parentb717c77e7af226f0f525df39fac49f11b3facd4c (diff)
fix the date picker in RT to use jscalendar instead of an HTML popup (that had acquired the page header, eek), RT#1682
Diffstat (limited to 'rt/html/Elements/SelectDate')
-rw-r--r--rt/html/Elements/SelectDate15
1 files changed, 13 insertions, 2 deletions
diff --git a/rt/html/Elements/SelectDate b/rt/html/Elements/SelectDate
index b43f324ac..23df246ce 100644
--- a/rt/html/Elements/SelectDate
+++ b/rt/html/Elements/SelectDate
@@ -45,10 +45,21 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
+%# in PageLayout instead, once <% include('/elements/init_calendar.html') |n %>
+<input type="text" id="<% $Name %>" name="<% $Name %>" value="<% $Default %>" size="<% $Size %>" />
+<IMG SRC="<%$fsurl%>images/calendar.png" ID="<% $Name %>_date_button" STYLE="cursor: pointer" TITLE="Select date">
<script type="text/javascript"><!--
- onLoadHook('createCalendarLink("<% $Name %>");');
+Calendar.setup({
+ inputField: "<%$Name%>",
+% if ( defined($ShowTime) && $ShowTime ) {
+ ifFormat: "%Y-%m-%d %H:%M",
+ showsTime: true,
+% } else {
+ ifFormat: "%Y-%m-%d",
+% }
+ button: "<%$Name%>_date_button",
+});
--></script>
-<input type="text" id="<% $Name %>" name="<% $Name %>" value="<% $Default %>" size="<% $Size %>" />
<%init>
unless ((defined $Default) or
($current <= 0)) {