Add custom date fields to tickets
Description
This plugin allows for validating custom fields as dates in tickets. Just set up the field as a custom field, then use these extra options in the trac.ini file:
- fieldname.date = true
- Enable extra date stuff on this field.
- fieldname.date_empty = true
- Allow this field to be blank.
Currently this will only validate that the given input looks like the specified date format (see below). Date range checking could be added if someone asks nicely enough.
The configurable options are:
- format =
- valid formats are dmy, mdy, and ymd
- separator =
- possible values are - or . or /
- first_day =
- let you change the first day of week (0=Sunday .. 6=Saturday) (as introduced in #1726)
The following options are available since [7192]
- months = 1
- How many months to show at once?
- milestone = false
- Use datepicker for milestone due/complete? (format= must match your locale)
- weeknumbers = false
- Show ISO8601 week numbers?
- panel = false
- Show a button panel with "Today" and "Done" buttons (at bottom)?
- change_month = false
- Show a dropdown with month selection?
- change_year = false
- Show a dropdown with year selection?
- match_request =
- Use datepicker on arbitrary request paths. Use text fields with class=datepick in your template, and configure the start of request path (in list format), like: match_request = /query,/other_path
There are many other options, but you need to modify the datefield.html template if you want to use them. See http://docs.jquery.com/UI/Datepicker
Bugs/Feature Requests
DateFieldPlugin now requires >= changeset:7982, or apply the changeset:7982 patch. Alternatively, you can use r3982 which is older, has more bugs and less features.
Existing bugs and feature requests for DateFieldPlugin are here.
If you have any issues, create a new ticket.
Download
Download the zipped source from here.
Source
You can check out DateFieldPlugin from here using Subversion, or browse the source with Trac.
Example
To enable:
[components] datefield.* = enabled
To add a Due Date:
[ticket-custom] due_date = text due_date.date = true due_date.label = Due Date due_date.value = MM-DD-YYYY due_date.date_empty = true
To configure:
[datefield] format = mdy separator = - first_day = 1
Recent Changes
[7193] by doki_pen on 11/26/09 06:50:23
Added contributors
[7192] by doki_pen on 11/26/09 06:36:22
generalize datepicker
Now kinda works with milestones. Uses a class name instead for future enhancements. fixes #6246. thanks terje!
[7186] by doki_pen on 11/25/09 23:28:08
Add datepicker options
[7183] by doki_pen on 11/25/09 20:52:46
Week numbers.
and jquery-ui fixes related to week numbers
Author/Contributors
Author: coderanger
Contributors: doki_pen, terje
Attachments
- Sample_Report.txt (0.7 kB) -
Example of using date field in a report.
, added by bigjonroberts on 02/01/08 21:38:23. - DateFieldPlugin.png (39.0 kB) - added by anonymous on 07/06/09 17:34:05.
- datefield.jpg (19.2 kB) - added by doki_pen on 07/14/09 22:42:20.
- customfields.jpg (6.2 kB) - added by doki_pen on 07/16/09 04:39:11.



