Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #450 (closed enhancement: fixed)

Opened 13 years ago

Last modified 12 years ago

[PATCH] Added a py:attrs on CalendarDatePicker widget

Reported by: jpaulofarias at gmail dot com Owned by: anonymous
Priority: normal Milestone: 0.9
Component: TG Widgets Version:
Severity: normal Keywords:
Cc:

Description

I'm submitting a patch to CalendarDatePicker? template to insert py:attrs, allowing one to add events catching and other attributes to the <input> of the calendar.

Patch inlined bellow

Index: turbogears/widgets/base.py
===================================================================
--- turbogears/widgets/base.py	(revision 570)
+++ turbogears/widgets/base.py	(working copy)
@@ -524,7 +524,8 @@
                 JSLink(static, "calendar-setup.js")]
     template = """
     <div xmlns:py="http://purl.org/kid/ns#" py:strip="True">
-    <input type="text" id="${widget.name}" name="${widget.name}" value="${widget_value}" class="date_field ${' '.join(widget.css_classes)}"/>
+    <input type="text" id="${widget.name}" name="${widget.name}" value="${widget_value}"
+        class="date_field ${' '.join(widget.css_classes)}" py:attrs="widget.attrs"/>
     <button id="${widget.name}-trigger" class="date_field_button">Choose</button>
     <script type="text/javascript">
     Calendar.setup(

Change History

comment:1 Changed 13 years ago by kevin

  • Status changed from new to closed
  • Resolution set to fixed

Thanks! Committed in [577]

Note: See TracTickets for help on using tickets.